Operating System - HP-UX
1752806 Members
5821 Online
108789 Solutions
New Discussion юеВ

Re: file permissions don't match umask

 
SOLVED
Go to solution
Jo Davis
Advisor

file permissions don't match umask

I am trying to determine what is controlling the permissions on a file that is written out from an oracle database to a nfs mounted filesystem.
User runs an application on server1 which connects to an oracle database on server2. server2 writes out to a directory on server2 that is nfs mounted from server1.
umask for all users on both servers is set to 022.
directory permissions are
drwxrwsr-x 2 bintmgr dba 16384 Sep 6 03:15
file writes out as :
-rw------- 1 oracle dba 28063 Aug 31 09:56 CUSP020A.lis
Why is there no read permission for the group?
I need to have read permission for the group and the umask is set properly but the file writes out different permissions that the umask.

4 REPLIES 4
Tim Nelson
Honored Contributor

Re: file permissions don't match umask

One of two thoughts.

The file already exists with 600 permissions.

The umask of oracle is not really 022. If a change to the umask was made, was oracle taken down and restarted so the change was enabled ?

Jo Davis
Advisor

Re: file permissions don't match umask

new file, it did not exist prior
su - oracle
umask
022
The oracle database is started through a root cron job. root umask is also 022.
If I touch a file in the offending directory from either root or oracle it shows up as
rw-r--r--
Todd McDaniel_1
Honored Contributor
Solution

Re: file permissions don't match umask

I found this forum thread about how oracle handles file permissions...

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=675215


Here is the exerpt.

---------------------------------------------
Oracle stored procedures do not use the .profile when they shell out and create files.

Therefore no umask.

Therefore no default permissions.

The fix is one of the following:

1) Have the stored procedure issue a chmod command after creating the file.
2) Have the stored procedure call a script that incldues the .profile parameters prior to creating files.
---------------------------------------------
Unix, the other white meat.
Jo Davis
Advisor

Re: file permissions don't match umask

Thank you!