[Sderby] Re: Creating files

James Gibbon james.gibbon at virgin.net
Sat Apr 10 03:52:52 BST 2004


On Fri, 9 Apr 2004 22:16:52 +0100
Mike Hemstock <hemstock at tiscali.co.uk> wrote:

> Hi folks,
> 
> Couple of questions.  Does anyone know how to change the default
> permissions that a file is given when it is created?  Also, is it
> possible to change this on a per directory basis.  I would like users
> home directories to be 700 but the shared data area to be 770.  Does
> anyone know how to achieve this?
> 

You can use umask to set default permissions, but on a shell basis, not
on a directory/location basis.

But you should be able to tweak the permissions of the directories
themselves to achieve what you want - since directory permissions will
override file permissions in some circumstances - eg if you have 700 set
on a home dir, the group/world permissions of files in there are
redundant.

Cheers
James





More information about the Sderby mailing list