-
Notifications
You must be signed in to change notification settings - Fork 142
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
Override permissions for borg mount
#362
Comments
Well, guess it depends a bit on your goal, but if we assume it is "restoring other users' files to the state as they were at backup time", Nor could you chown to the correct uid/gid if you are not root. So, backup and restore for other users' files needs to be done as root, using borg create/extract. |
Thanks for weighing in. Usually my main use case with If most people use it like this, always changing the owner and permissions would make sense. So curious to get more feedback. |
I just tried |
On macOS it will retain the original user as well, which makes it mostly useless when working with a random server backup. There seem to be small differences between OSs. That's why I'm all for normalizing this, so I can quickly grab a few files without having to run borg as root. For complex scenarios there is |
Or Fedora specific? I tried it inside and outside of a Flatpak and got the same result. But back to the original question, I am all for adding |
Thanks for weighing in everyone. Did a (very simple) PR and tested with a client NAS that often loses some data. Works all well. |
Problem
I sometimes restore backups of remote servers. Most files there would belong to other users, like root. Using default mount options,
borg mount
will use the original permissions, thus denying access to normal users.Solution
Since Vorta targets desktops, I suggest to always run
borg mount
with the following options to give the current user read access:borg mount -o umask=0277,uid=$UID [email protected]:repo::2019-04-30-1556602978 mnt
Describe alternatives you've considered
Not aware of alternatives. The above solution only partly solves the problem. Backups that use ACL (e.g. from Synology NAS) still need to be mounted as root and won't work as normal user on macOS, even with permissions set as above. It works fine on Linux though.
Any opinion on this or issues you experienced, @Hofer-Julian @ThomasWaldmann
The text was updated successfully, but these errors were encountered: