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 problem

Status
Not open for further replies.

umeman

Technical User
Oct 2, 2001
59
US
I am having the following problem when setting the umask
in the profile

Suppose I set umask to 002 and I create a directory
The directory is created with the correct permissions
drwxrwxr_x

However when I create a file the file is created with
permissions:
_rw_rw_r_ _

Can anyone tell me why this could happen.

Thanks
-u-
 
Hi,

Umask does not apply executable permissions to any file. No option from 0 to 7 carries the function. Whereas the effect on directories does include the ability to carry executable permissions.

You should see `man umask` for details

But I cannot explain the reason why this is so! Sorry!

Cheers

Jimbo
 
As Jimbo said, no setting of umask will allow execute permission on a newly created file. The reason for this is probably security-related ... making a file executable should be a deliberate act on the part of the owner, and not a permission that's granted automatically.

Greg.
 
Hi,

Acc. to the Solaris Admin Guide :-
The default permissions for a directory are 777 while for a file it is 666.So if u set the umask to 002,the new file's permissions would be (666-002=664) which is rw-rw-r--

I hope u got the answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top