On 01/23/2016 09:42 PM, Vincent Blut wrote: > mix archives created by an unpriviledged user and > root inside a single backup repository… and it seems borg doesn’t > like that experiment. :-) > > PermissionError: [Errno 13] Permission denied: > '/mnt/backup/lamella/data/0/6148' > > Platform: Linux lamella 4.3.0-1-amd64 #1 SMP Debian 4.3.3-5 > (2016-01-04) x86_64 Linux: debian stretch/sid LibC: glibc 2.9 > Python: CPython 3.5.1+ > > I did not investigate this issue closely, but I guess it happens when > borg tries to deduplicate data but can’t access the chunk in > question > > Your opinion? > > Cheers, Vincent
Hi Vincent, as Gianfranco already posted I don't think this is an issue with borg. On my system, root's umask is 0022, meaning files get created rw-r--r-- by default, forbidding users to open them for writing. (I had it on 0077 once, was "fun"…) Try to reproduce the following: root# touch /testfile user$ echo foo >> /testfile (should give permission denied error) root# rm /testfile root# umask 0000 root# touch /testfile user$ echo foo >> /testfile (should work) If that is the case (and root+user are the only ones accessing the backup directory) maybe you can try to incorporate umask 0000 into your root's call of borg, and see if it works as planned. (Note that root will always be able to write to user-owned files, so changing user's umask won't be necessary) If you have more than one user, you will need to setup file ACLs so that each of them has write access to files and directories, no matter who created them. IIRC file ACLs will override the simple unix user/group/world permission bits, so the umasks should not matter anymore. But dont ask me about how exactly that ACL magic works ^^ Try searching for "facl" on the webs, maybe someone has a good starting point out there. Cheers, - Danny