2

I have created a backup-user (let's just call it jeremy) on an Ubuntu-server.

Then I've created a backup-dir, containing files from several different servers:

/backup
   |
   |--server1
   |     |--daily_backup
   |     |--weekly_backup
   |
   |--server2
   |     |--daily_backup
   |     |--weekly_backup

I've then granted access to the backup-dir for jeremy with the following command:

setfacl -R -m u:jeremy:rwx backup/

However... If I login with the root-user and create a new directory, for instance: /backup/server2/monthly_backup, then jeremy won’t have access to the folder.

Is there a way to make it so that both root and jeremy can read, write and execute everything in the /backup-directory?

1 Answer 1

4

One must remember to create a default mask for all new filesystem objects as well.

setfacl -d -m u:jeremy:rwx backup/
1
  • Awesome! I do need the -R-flag, in order for it to take effect on subfolders as well. So setfacl -R -d -m u:jeremy:rwx backup/ did the job.
    – Zeth
    Commented Mar 22, 2018 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .