Bug: Permission denied if parent folder's group is not "urbackup" (Ubuntu)


#1

It seems there is a bug in the way urbackup server tests access to the backupfolder.

I would like to set urbackup backupfolder as /home/backup/urbackup

root@host (0)# ls -ld /home
drwxr-xr-x 1 root root 134 Jun 5 19:07 /home
root@host (0)# ls -ld /home/backup
drwxr-x— 1 root backup 25724 Jun 5 19:07 /home/backup
root@host (0)# ls -ld /home/backup/urbackup
drwx------ 1 urbackup urbackup 50 Jun 5 19:08 /home/backup/urbackup

User urbackup belongs to group backup

root@host (0)# groups urbackup
urbackup : urbackup backup
root@host (1)# sudo -u urbackup touch /home/backup/urbackup/permission_test
root@host (0)# ls -l /home/backup/urbackup /
total 0
-rw------- 1 urbackup urbackup 0 Jun 5 19:18 permission_test

/var/log/urbackup.log:

2018-06-05 19:25:52: ERROR: Cannot open “/home/backup”: Permission denied (13)
2018-06-05 19:25:52: ERROR: Cannot open “/home/backup/urbackup”: Permission denied (13)

If I use folder /home/urbackup as backupfolder, and /home/urbackup is owned by urbackup:urbackup it works OK.

Maybe the permission testing is bit off? I noticed someone else had the same issue earlier, but no one answered him.

Server host is running: Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-127-generic x86_64)
urbackup version is: 2.2.11.2193-1ubuntu1~xenial


#2

Change the permission on the parent directory /home with recursive permission. This should work.


#3

urbackup can access /home
it cannot access /home/backup even the urbackup-user has read/execute rights to the directory and the sudo command works all fine. It is urbackup-server issue. It is testing directory permissions in some weird way.


#4

U need to give urbackup user permission for
/home/backup/urbackup

drwxr-xr-x 1 root root 134 Jun 5 19:07 /home
drwxr-x— 1 root backup 25724 Jun 5 19:07 /home/backup
drwx------ 1 urbackup urbackup 50 Jun 5 19:08 /home/backup/urbackup

Change the permission and this will work for you.


#5

But urbackup user has already full rwx user-permissions to the /home/backup/urbackup directory. urbackup-server log complains about the /home/backup folder to which urbackup-user has rx-permissions through backup-group membership.


#6

it should have rwx permission.


#7

sudo chown -R urbackup:urbackup /home/backup/urbackup
sudo chmod -R 777 /home/backup/urbackup


#8

I am sorry, but you are misunderstanding the issue. The problem is access to the folder /home/backup to which user “urbackup” has rx permissions through “backup”-group membership.