[Tfug] Setting default permissions on new files

Ammon Lauritzen allaryin at gmail.com
Wed Jun 2 12:30:32 MST 2010


It is my understanding that processes usually inherit umask from
parents unless overridden. So if you launch nautilus with an open
umask it should honor it unless it is manually resetting permissions
upon file creation?

  - ammon

On Jun 2, 2010, at 11:43 AM, Glen Pfeiffer <glen at thepfeiffers.net>
wrote:

> I am using NFS to export a directory which I then mount on all my
> boxes. This is a directory for shared files between everyone in
> my household.
>
>
> The export is done like this:
>  /home/files *(rw,no_root_squash)
>
>
> The mount is done like this:
>  servername:/home/files /home/glen/files nfs rw 0 0
>
>
> I have set the group sticky bit on the root directory like this:
>  #chmod g+s files
>  #ls -al | grep files
>  drwxrws---  16 glen   users   4096 2010-06-02 11:01 files
>
>
> I set the group sticky bit so that newly added files/directories
> will have the same group as the parent directory instead of the
> users primary group. Like so:
>
>  #touch test
>  #ls -al | grep test
>  -rw-r--r--  1 glen users         0 2010-06-02 11:26 test
>
>
> What I would like however, is for the group's write bit to set by
> default as well. So it would look like this:
>
>  -rw-rw-r--  1 glen users         0 2010-06-02 11:26 test
>       ^
>
> How would I accomplish that? I am aware of umask, but as far as I
> can tell, graphical file managers (nautilus, thunar, etc) do not
> honor that.
>
> I had a similar setup using Samba and autofs, and it had the
> ability to set the default permissions for newly added
> files/directories. But I quickly tired of that setup as it was
> much slower and significantly harder to configure new machines.
>
> --
> Glen
>
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org




More information about the tfug mailing list