1

Playing with ACL's:

[root@rex web]# pwd
/media/web
[root@rex web]# ll -d
drwxr-xr-x. 2 root root 4096 Jan  1 14:31 .
[root@rex web]# setfacl -m d:g::rwx .
[root@rex web]# setfacl -m g::rwx .
[root@rex web]# touch newTest
[root@rex web]# getfacl newTest
# file: newTest
# owner: root
# group: root
user::rw-
group::rw-
other::r--
[root@rex web]# getfacl .
# file: .
# owner: root
# group: root
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x

Simple question I'm just not able to answer it. If the executable bit is in the group's default ACL why isn't it showing up in the resulting file. I thought my umask setting was at fault but got the same result there:

[root@rex web]# umask
0022
[root@rex web]# umask 0000
[root@rex web]# touch anotherTest
[root@rex web]# getfacl anotherTest
# file: anotherTest
# owner: root
# group: root
user::rw-
group::rw-
other::r--

I'm sure it's intentional, I just don't understand it.

Tried to see if it was just something specific to the primary group but then a mask started showing up in my ACL's for some reason:

[root@rex web]# setfacl -m g:web:rwx .
[root@rex web]# setfacl -m d:g:web:rwx .
[root@rex web]# touch newer
[root@rex web]# getfacl newer
# file: newer
# owner: root
# group: root
user::rw-
group::rwx                      #effective:rw-
group:web:rwx                   #effective:rw-
mask::rw-
other::r--

I'd imagine this is why it isn't showing up above, but my questions are:

1) Why doesn't "mask" show up before I specify a group other than the primary group?

2) Where is this mask coming from? I'm not seeing it on any parent directory.

  • touch does a open("anotherTest", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) (not 0777) – Stéphane Chazelas Jan 1 '15 at 19:36
  • @StéphaneChazelas I get same result if I do a echo hey > this – Bratchley Jan 1 '15 at 19:37
  • Same > never request the execution bit. Generally applications don't request the execution bit unless there're meant to create executable files (like ld, gcc). – Stéphane Chazelas Jan 1 '15 at 19:38
  • OK, but where is the mask setting coming from then? – Bratchley Jan 1 '15 at 19:40
  • That's something else, see man acl – Stéphane Chazelas Jan 1 '15 at 19:41

Browse other questions tagged or ask your own question.