[Borgbackup] Permissions -- I erroneously ran Borg as root; how can I go back to user usage

Alexander Kiselyov aleksandr.kiselyov at gmail.com
Tue May 30 10:18:28 EDT 2023


It should be enough just to normally change owner as Borg shouldn't
change file mode flags. If you have sudo configured, it can be done as
follows:

    $ sudo chown -R $(id -u):$(id -g) /path/to/my/repository

The commands in $() are evaluated as your regular user, -R means
recursive operation.

Hope that helps.

Regards,
Alexander

On Tue, 2023-05-30 at 14:50 +0200, ldl08 at gmx.net wrote:
> Dear Borg friends,
> 
> https://borgbackup.readthedocs.io/en/stable/quickstart.html has a
> clear warning:
> 
> "To avoid permissions issues (in your borg repository or borg cache),
> always access the repository using the same user account.
> 
> If you want to backup files of other users or the operating system,
> running borg as root likely will be required (otherwise you’ld get
> Permission denied errors). If you only back up your own files, you
> neither need nor want to run borg as root, just run it as your normal
> user."
> 
> Well, I was trying some stuff out, and as it happens I ran Borg as
> root. Now I get an error message:
> 
> PermissionError: [Errno 13] Permission denied:
> '/path/to/my/repository'
> 
> I can continue to run it as root, but I'd like to go back to the old
> time. Is that possible, and if so, how?
> 
> Thanks for your insights!
> 
> David
> 
> _______________________________________________
> Borgbackup mailing list
> Borgbackup at python.org
> https://mail.python.org/mailman/listinfo/borgbackup



More information about the Borgbackup mailing list