Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local backup with another user as root? #8

Open
wired2051 opened this issue Nov 27, 2021 · 1 comment
Open

local backup with another user as root? #8

wired2051 opened this issue Nov 27, 2021 · 1 comment

Comments

@wired2051
Copy link

Hi!

I'm new to Docker, so this may be a stupid question, but I dare to ask it anyway: is it possible to make backups with a different user as root?

@helmuthb
Copy link
Owner

Sorry for the late response.

The question is, of course, not stupid at all :-)

There are three users which are relevant in this context:

  • Local user (where you start the container)
  • User within the container
  • User on the remote system (if using remote backup)

If - on your local system where you want to start the container - your user is a member of the group "docker", then you can start the container without being root. If not, then you would need to have root privileges.

The user within the docker container is root. It's a good idea to allow potential customization of this and allowing to use a container user other than root. By default it's root, because otherwise file ownership would be lost in the backups (all backups would then belong to the user in the docker container).

If you use rsnapshot to back up a remote system, then the remote user could be any user. Of course, you would only be able to back up files which this user can actually read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants