UFS Why does a file in an g+rwx default ACL'ed directory lose its write mask?

I have a directory that has a default ACL of g+rwx set up. If I touch a file inside that directory, I would've expected it would retain the rw permissions, but it seems it doesn't. An example explains:

Bash:
$ ./test_acl.sh
+ mkdir storage
+ setfacl -d -m u::rwx,g::rwx,o::-,m::rwx storage
+ touch outside
+ cd storage
+ touch inside
+ cd ..
+ ls -ld outside storage storage/inside
-rw-r--r--  1 aaa  aaa    0 Dec 28 03:16 outside
drwxr-xr-x  2 aaa  aaa  512 Dec 28 03:16 storage
-rw-r-----+ 1 aaa  aaa    0 Dec 28 03:16 storage/inside

+ getfacl -d storage
# file: storage
# owner: aaa
# group: aaa
user::rwx
group::rwx
mask::rwx
other::---

+ getfacl storage
# file: storage
# owner: aaa
# group: aaa
user::rwx
group::r-x
other::r-x

+ getfacl outside
# file: outside
# owner: aaa
# group: aaa
user::rw-
group::r--
other::r--

+ getfacl storage/inside
# file: storage/inside
# owner: aaa
# group: aaa
user::rw-
group::rwx      # effective: r--
mask::r--
other::---

+ umask
0022

Why did the group mask of storage/inside change from rwx to r--?

Also, executing the same commands on Debian doesn't have the same effect. In particular, the mask in Debian becomes rw-. Is one right and the other wrong? Or just different behaviour? Is there some sort of standard governing this?
 
Back
Top