[Discuss] Advanced file permisions

Derek Martin invalid at pizzashack.org
Tue Nov 25 18:49:56 EST 2014


On Tue, Nov 25, 2014 at 09:38:52AM -0500, Jerry Feldman wrote:
> I have an auto mounted directory where I want to restrict access to only
> members of a specific group, lets call it foogroup for now. I didn't want
> to use netgroups for a number of reasons in that the NAS is run by a
> separate team, and they use a different LDAP server than we do.
> 
> The way I set up the original top level directory is:
> chmod 2770: rwxrws--- foogroup
> But when I create a subdirectory I get:
> rwx--S---

How did you create the directory?  If you're using mkdir on the
command line, the umask seems like the only possible culprit,
excepting some weird filesystem mount options possibly.  The mkdir
command  has a -m option to set the mode but one can assume you're not
using that, or else you would know. =8^)  

If you're doing this from within a program, the mkdir() system call
takes a mode argument (and is, I believe, still modified by your
umask).  That's for C obviously but other languages should generally
have something similar, and in some of those languages it may be
optional, defaulting to something you don't want...

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



More information about the Discuss mailing list