System Administration
Showing results for 
Search instead for 
Did you mean: 

Re: file permissions don't match umask

Go to solution
Jo Davis

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.

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

Re: file permissions don't match umask

new file, it did not exist prior
su - oracle
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
Todd McDaniel_1
Honored Contributor

Re: file permissions don't match umask

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

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

Re: file permissions don't match umask

Thank you!