Mount Borg Repo for Other Users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on CentOS7/AWS | |
$ sudo adduser borg-1 | |
$ sudo adduser borg-2 | |
$ sudo yum install -y borgbackup | |
$ sudo mkdir /mnt/repo | |
$ sudo chown borg-1:borg-1 repo | |
# Allow access to other users | |
$ sudo -u borg-1 borg mount -o allow_other w66xh7lj@w66xh7lj.repo.borgbase.com:repo /mnt/repo | |
$ ll | |
total 0 | |
drwxr-xr-x. 1 borg-1 borg-1 0 May 24 01:17 repo | |
$ sudo -u borg-2 ls repo | |
nyx2.local-remote-test-repo-2018-12-14T12:51:06 nyx2.local__test-repo-2019-05-17T18:59:18 | |
nyx2.local-remote-test-repo-2018-12-14T14:08:00 nyx2.local__test-repo-2019-05-19T11:12:52 | |
... | |
# Unmount and try without `allow_other` | |
$ sudo -u borg-1 borg umount /mnt/repo | |
# Mount without allowing access | |
$ sudo -u borg-1 borg mount w66xh7lj@w66xh7lj.repo.borgbase.com:repo /mnt/repo | |
$ sudo -u borg-2 ls -l | |
ls: cannot access repo: Permission denied | |
total 0 | |
d????????? ? ? ? ? ? repo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment