[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting permissions to new files?



Bruno Buys wrote:
> Where do I change the permissions that are set when I create a new file? 
> ...
> I'd like new files to be created as writable to the group, as in
> -rw-rw-r-- 1 bruno bruno 0 2007-06-17 18:06 newfile

It sounds like you are trying to set up a "User Private Group" type of
configuration.  Is that correct?  That is a typical and good
configuration to use in a group of users.

In that case you will want to modify /etc/profile and change the umask
setting there from 'umask 022' to 'umask 02'.  That file is sourced by
login shells.

  sudo editor /etc/profile

Note that the default install configuration for the root user is to
have /root/.bashrc set 'umask 022' and to have /root/.profile source
the /root/.bashrc file but these are often customized.  Even when
using UPG for non-root users it is desirable to keep root's umask to
be 022.  After making the above change to /etc/profile you should log
in as root and verify that root's umask is still 022.  This is just in
case root's environment has been customized and the umask setting
removed.

Bob



Reply to: