NYCPHP Meetup

NYPHP.org

[nycphp-talk] chmod - sticky bits on dirs

bpang at bpang.com bpang at bpang.com
Thu Feb 19 23:14:32 EST 2004


http://geodsoft.com/howto/harden/groups.htm

This site recommends changing the umask of the group users (about 3/5 of
the way down the article) in addition to setting the GUID bit for the dir
with
chmod g+s <dirname>

"By setting the user's umask to 002 rather than the more standard 022,
files they create will be group writable. If the user's primary group is a
unique group that matches their user ID, then umasks of 022 and 002 are
functionally identical, except in directories that are GUID. In these
directories newly created files will be owner and group writable and world
readable. In other directories, the files will still be group writable but
since there are no other members of the group, they will effectively be
only owner writable and group and world readable."

Thoughts anyone?
I tested and it does do the trick.


> John Lacey wrote:
>
>> bpang at bpang.com wrote:
>>
>>> I have a directory in which I want all files or sub-directories
>>> (existing
>>> and newly created/added) to be rwx by any member of the group which
>>> owns
>>> the directory.
>>
>>
>> try chmod -R 1777 <dirname>
>
>
> Hmmm, on BSD anyway, the sticky bit on directories causes them to be
> append only, restricting the deletion of files by anyone but their
> owners (and the owner of the directory).
>
> What I don't know how to do is just the opposite: some way to create a
> directory that would cause all files added to it, by any user, to
> automatically be group-writeable. (That is, not relying on the user to
> chmod 775 the files they add.)
>




More information about the talk mailing list