Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are moving our web files from AFS to a local volume with the acl flag set. We use extended ACLs for our permissions so users can edit different parts of our websites. In AFS, when you create a new file it inherits its parent's permissions.

How do we make it so that when users create new files in their web directories, those files inherit the parent's facl? (Which includes www-data) If it helps, we run Gentoo Linux.

share|improve this question
    
what filesystem are you using in your local volume? –  c4f4t0r Nov 25 '13 at 23:15
    
ext4 (with the acl flag in fstab) –  Vacation9 Nov 25 '13 at 23:22
    
if you check my answer you can see a link some example –  c4f4t0r Nov 25 '13 at 23:24

1 Answer 1

up vote 1 down vote accepted
+100

On linux many filesystems support posix acl, for more information you look this link http://users.suse.com/~agruen/acl/linux-acls/online/,if you have many directories and you wanna apply the acls on subdirs

 -R, --recursive
       Apply operations to all files and directories recursively. This option cannot be mixed with ‘--restore’.

But if you wanna the acl are apply on files and directories on creationes time, you need the defaults acls on directory

 setfacl -d -m user:user01:rwx dir
share|improve this answer
    
We are using posix/extended acls. What we want to do is have these apply recursively, as normal acls do, upon creation of a new file in that directory. –  Vacation9 Nov 25 '13 at 23:27
    
Alright, if new directories are created in the directory with default acls set will they also inherit those defaults? Or will the defaults apply at any depth? –  Vacation9 Nov 25 '13 at 23:49
    
yes, i tried now and i can tell it work, if you set the default acl on a directory, the subdir inherit the acl from parent dir and default too –  c4f4t0r Nov 25 '13 at 23:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.