[Tfug] Setting default permissions on new files
Glen Pfeiffer
glen at thepfeiffers.net
Wed Jun 2 11:43:15 MST 2010
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
More information about the tfug
mailing list