1748209 Members
2733 Online
108759 Solutions
New Discussion юеВ

Re: umask

 
SOLVED
Go to solution
navin
Super Advisor

umask

Hello ,
In my hp system i have not set any umask in /etc/profile. as myself and super user when files are created it is created as 666.BUt for an user oracle it is created as 644 - There is a requirement to change this to 666 - i tried setting this in oracle users .profile umask 022 - but it does not help.Any advice ? much appreciated.
Thanks
Learning ...
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: umask

Hi Navin:

If you want files created by the 'oracle' user to have permissions of 666 (-rw-rw-rw-) then in oracle's '.profile' specify:

umask 000

This is very poor security. A 'umask=022' which by default creates files with 644 permissions is much better.

Regards!

...JRF...
Dave Hutton
Honored Contributor

Re: umask

umask 022 doesn't make the files 666.

Also on a side note if these files are created by ftp. A lot of times it will be set in the inetd.conf.

A. Clay Stephenson
Acclaimed Contributor

Re: umask

If you want 666 mode set for files then umask must be set to 000 but this is a necessary but not necessarily sufficient condition. There are two things at play during file creation: 1) The creation mode 2) umask. If the file creation mode (which for the shell is 666 but depends upon the application) then a umask of 000 "subtracts" nothing and the resulting mode is 666. However, if the creation mode is 644 then regardless of the umask value, the file is created with at most 644 permission. Umask cannot put in a permission that was not granted at the outset.

Finally, whoever has requested a 666 file mode is woefully ignorant of good security practices.
If it ain't broke, I can fix that.
Tim Nelson
Honored Contributor

Re: umask

As side note:

Don't forget to set the default ftp umask by adding "-u 022" to the end of the ftp services line in /etc/inetd.conf.