Default permissions

Adam Hawes adamh at adpro.com.au
Fri Sep 8 05:51:50 CST 2006


The default permission with a umask of 000 is 777.  Umask is used to rip these away.  Touch won't deliberately creates normal files rather than executable ones.

I don't believe you can set a umask on a per-directory basis.  You can set it in a per-program basis.

A


> -----Original Message-----
> From: Nicholas Thiele [mailto:Thiele.Nicholas at TransAdelaide.sa.gov.au]
> Sent: Friday, 8 September 2006 3:39 PM
> To: Adam Hawes; linuxsa at linuxsa.org.au
> Subject: RE: Default permissions
> 
> 
> 
> Can 'umask' grant extra permissions?  When we 'touch' a file in a
> specific directory it doesn't get execute permissions.  We want to
> ensure that every file created in a specific directory gets execute
> permissions.  Is there something we are missing?
> 
> Nic T.
> 
> -----Original Message-----
> From: Adam Hawes [mailto:adamh at adpro.com.au] 
> Sent: Friday, 8 September 2006 3:16 PM
> To: Nicholas Thiele; linuxsa at linuxsa.org.au
> Subject: RE: Default permissions
> 
> *grr* didn't finish the last reply before the fat fingers hit enter.
> 
> <quote bash>
> umask [-p] [-S] [mode]
> The user file-creation mask is set to mode.  If mode begins with a
> digit, it is interpreted as an octal number; otherwise  it is
> interpreted as a symbolic mode mask similar to that accepted by
> chmod(1).  If mode is omitted, the current value of the mask 
> is printed.
> The -S option causes the mask to be printed in symbolic form; the
> default output is  an octal number.  If the -p option is supplied, and
> mode is omitted, the output is in a form that may be reused as input.
> 
> The return status is 0 if the mode was successfully changed or if no
> mode argument was supplied, and false  otherwise.
> </quote>
> 
> Umask will do what you want :) (man 2 umask)
> 
> A
> 



More information about the linuxsa mailing list