1834741 Members
3020 Online
110070 Solutions
New Discussion

umask question

 
SOLVED
Go to solution
Linda Card
Frequent Advisor

umask question

I did a umask on my 10.20 box and got
back 02 (that is - zero two). Do I read this
as 002? And will new files will be created with 775 perms? I read in archive that "x" doesn't translate in umask; so would that mean new files would be created 664 with the 02 umask?

Thanks for help.
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: umask question

Linda,

Yes, it states in the man page that "leading zeros can be omitted".


Pete

Pete
Pete Randall
Outstanding Contributor

Re: umask question

Linda,

And "a minimum of two digits".


Pete

Pete
Steven E. Protter
Exalted Contributor
Solution

Re: umask question

umask 022

touch filenmae

rw r r

Are the resultant permissions

umask 02

permissions

rw rw r


Permissions on the second test produces 664.

Sometimes testing is the way to go.

One caveat, that I don't think should matter: My test occurred on hp-ux 11i v1

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Linda Card
Frequent Advisor

Re: umask question

Thanks for the help.