I'm trying to set default permissions so that all files created in my folder hackerank would be created with rwx by default.
I've done a chmod g+s
(as I was looking at different threads, not sure this did anything to be honest, but just in case it changes anything):
chmod g+s hackerank/
and then tried to set default ACLs on the group:
setfacl -d -m g::rwx hackerank/
If I check ACLs, they now look good:
getfacl hackerank/
# file: hackerank/
# owner: will
# group: will
# flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:will:rwx
default:mask::rwx
default:other::r-x
But I create a new file, it still inherits -rw-rw-r--+
(the + showing the ACL attributes are in effect:
touch hackerank/test
ll hackerank/
total 8.0K
drwxrwsr-x+ 2 will will 4.0K Jul 11 16:09 ./
drwxr-xr-x 3 will will 4.0K Jul 11 15:03 ../
-rw-rw-r--+ 1 will will 0 Jul 11 16:09 test
getfacl hackerank/test
# file: hackerank/test
# owner: will
# group: will user::rw-
group::rwx #effective:rw-
group:will:rwx #effective:rw-
mask::rw-
other::r--
Any clue as to what I have missed?
Thanks for your help
getfacl test
plz! – sourcejedi Jul 11 '17 at 18:36getfacl hackerank/test
# file: hackerank/test
# owner: will
# group: will
user::rw-
group::rwx #effective:rw-
group:will:rwx #effective:rw-
mask::rw-
other::r--
– Will1v Jul 11 '17 at 22:30