I am trying to set up ACL's so that all new sub-directories and files withing a directory automatically inherit it's parents permissions. From what I understand I could achieve this by setting the default permissions for all groups and users, this is what I did:
mkdir test chown root:media test chmod 775 test chmod g+s test (so all directories and files are in the same group) setfacl -dm g::rwx test getfacl test
Here is the output of the last command:
# file: test # owner: dom # group: media # flags: -s- user::rwx group::rwx other::r-x default:user::rwx default:group::rwx default:other::r-x
All seems correct but when I create files withing thest directory they do not have correct permissions.
cd test mkdir dir touch file ls -l
Here are the results of the last command:
root@Server:/test# ls -l total 4 drwxrwsr-x+ 2 root media 4096 Oct 27 19:24 dir -rw-rw-r-- 1 root media 0 Oct 27 19:24 file
I am using Ubuntu Server 14.04 with on ext4 file system.
Ac you can see the directory has the correct permissions but the file is missing execute permissions. I have also tried this on another directory (/mnt/disk1) and the file was missing read permissions also. What am I doing wrong?