Re: question about mask inheritance

Andreas Gruenbacher <[email protected]> Thu, 1 Jul 2004 08:56:47 +0200
Newsgroups gmane.linux.file-systems.acl.devel
Organization SUSE Labs
Message-ID <[email protected]>
On Thursday 01 July 2004 03:34, Scott Mcdermott wrote:
> I have the following:
>
>          prompt# getfacl .
>         # file: .
>         # owner: a2bcm
>         # group: pdt
>         user::rwx
>         group::rwx
>         group:teamleads:r-x
>         mask::rwx
>         other::r-x
>         default:user::rwx
>         default:group::rwx
>         default:group:teamleads:r-x
>         default:mask::rwx
>         default:other::r-x
>
>          prompt# touch thatfile
>
>          prompt# getfacl thatfile
>         # file: thatfile
>         # owner: root
>         # group: root
>         user::rw-
>         group::rwx                      #effective:rw-
>         group:teamleads:r-x             #effective:r--
>         mask::rw-
>         other::r--
>
> what I am trying to understand, is why `thatfile' was
> created with mask 06, but its directory has a default ACL
> that specifies a mask of 07.

Touch uses the following system call to create the file:
   open("foobar", O_WRONLY|O_CREAT|..., 0666);

the individual ACL entries of the default ACL are modified by the mode 
parameter to open: 0666 stands for user::rw,group::rw,other::rw. The 
permissions of the new file are set to the intersection between this and the 
default ACL:

>         default:user::rwx
>         default:group::rwx
>         default:group:teamleads:r-x
>         default:mask::rwx
>         default:other::r-x

   user::rw-			= rwx & rw-
   group::rwx
   group:teamleads:r-x
   mask::rw-			= rwx & rw-
   other::r--			= r-x & rw-

Cheers,
-- 
Andreas Gruenbacher <[email protected]>
SUSE Labs, SUSE LINUX AG
_______________________________________________
acl-devel mailing list
[email protected]
http://acl.bestbits.at/mailman/listinfo/acl-devel