|
I want to share my Borg backup with two users, let's call them user A and user B. Both user accounts are local accounts. Adding both users and the mounting point to the Same group, eg "borg" isn't enough. |
Replies: 1 comment 1 reply
|
A common group and a shared directory are not enough because Borg writes with umask 0077 by default, so everything in the repository ends up owned by user A with mode 0600 and the group bit is useless. You need I set this up with two local accounts, both in a With The trap: that flag has to be on every call from both users. I ran one In Vorta, put For the mounting part there are two separate things. A FUSE mount is private to the user who made it: B can mount A's repository and browse it, but A gets Two things worth weighing before you go down this path. Each user keeps their own chunk cache in So the umask route works, as measured above, but it stays correct only while every invocation from both sides remembers the flag, and it costs a cache resync on every handover. If what you actually want is for both accounts to back up to the same disk, two separate repositories under the same shared directory avoid all of this, and still deduplicate within each user's own data. |
A common group and a shared directory are not enough because Borg writes with umask 0077 by default, so everything in the repository ends up owned by user A with mode 0600 and the group bit is useless. You need
--umask 002on every Borg call from both users, and there is a trap if one of them forgets.I set this up with two local accounts, both in a
borggroup, and a setgid directory (chgrp borg /srv/backup && chmod 2775 /srv/backup), which is the setup you describe. With the default umask, user B cannot even list the repository, and the error does not mention reading at all: