[plug] public_html file permissions/cmask
Matt Kemner
zombie at penguincare.com.au
Fri Oct 29 08:54:20 WST 2004
On Fri, 29 Oct 2004, quoth skribe:
> An example: my wife and I have a work directory. We both create and modify
> files in that directory - us being members of the Work group and all. The
> Work group has read, write and execute perms. When I create a file (say with
> OOo) I have to manually change the group to Work so my wife can work on the
> file. This also happens sometimes when you modify the file too. It would be
> nice if you could assign a 'template' upon a directory and say everything
> created or modified in this directory has the following perms and group
> ownership.
Set your umask to 002 before loading OOo (or whatever) and set the sgid
bit on the directory (eg chmod 2775 dirname) - and make sure the dir is
owned by your group. That will cause all files in the directory to be
owned by the group, and the umask ensures your permissions will be 664 (or
775 for directories)
For one of my customers who needed a solution like this, I modified one of
the xinit scripts so it sets the umask just after they log into X.
- Matt
More information about the plug
mailing list