I know there are plenty of questions and answers about ACL and permissions, but to be honest they are so weak to make any coherent understanding! it's just like a mix of unorganized information.
Hope this question will put an end to this confusion
On my Ubuntu 14.04 web server, I want to:
- make all
- AND make
Admin:www-datathe only default owners
I used ACLs:
setfacl -Rdm u:admin:rwX /path/to/parent //capital X apply for folders setfacl -Rdm g:www-data:rX /path/to/parent setfacl -Rdm o::- /path/to/parent
now already existed files and folders take the rules perfectly.
Now I am logged as user
admin, when I make new directory it gets
750? And when I make new file it gets 660 not 640? Why isn't it adopting the rules!?
# owner: admin # group: www-data # flags: ss- user::rwx group::r-x other::--- default:user::rwx default:user:admin:rwx default:group::r-x default:group:www-data:r-x default:mask::rwx default:other::---
It looks like there is some conflict between rules! although I deleted all ACL before applying the new rules.
P.S. I remember combining them in one command like below used to work... but it's not!
etfacl -Rdm u:admin:rwX,g:www-data:rwX,o::- /path/to/parent
If you know a correct short version please don't hesitate to provide :)