I've been using borg-backup for the past few weeks (on Ubuntu 16.04).

Every time I need to mount a backup I've used sudo (sudo borg mount ...); if I don't, I end up with a permission error and the borg filesystem is not mounted.

The problem is that afterwards, the mounted filesystem requires sudo for everything. Since borgfs is read-only, I can't change the ownership with sudo chown -R myuser borgfs-mountpoint after the fact.

Because I can't do sudo cd some-dir-inside-borgfs with my normal user, I end up switching my user to root with su to navigate the filesystem and do everything else, which I'm not a big fan of (maybe this is OK? I'm still pretty new to *nix).

This is what I have inside my borg-repo:

myuser .
root   ..
myuser config
myuser data/
root   hints.314331
root   index.314331
myuser README

But everything inside the data directory is owned by root.

First: Is this normal? Is it this way in your borg repo?

Second: If I do sudo chown -R myuser:myuser borg-repo/data/, will my mounted borg filesystem be accessible by myuser the next time I mount it? Or is it better to not mess with the ownership of these files?

  • i think this ownership of the data/ directory is normal if you create any archives with sudo borg create... you'd probably have to test in a new repository with regards to changing the file permissions – DeveloperACE Nov 13 '18 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.