Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

umask

Status
Not open for further replies.

gyan

IS-IT--Management
Jul 8, 2001
18
US
Hi,

What's the value of umask shall I set, in order to get file (newly created) permission of 755?

ENV is Solaris 8 and ksh.

Thanks,

GP
 
to determine what to set the umask to, subtract the desired permissions
example
777 - 022= 755 directories
666 - 022= 644 files

Therefore, set your umask 022
.

Farah regal
good luck
"think twice and hit enter once"
 
As far as I know, no setting of umask will enable execute permission on any file which is created. Execute perms must be set manually.

Greg.
 
It depends on how you are creating the file. If you are using the creat function, you can set the permission during creation.

umask only filters permissions. Files are generally created with 666 and use the umask to filter from that default. Directories are made with 777 before the umask is used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top