General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to force oracle to generate logfiles with a specific permission

Leonard C.
Frequent Advisor

How to force oracle to generate logfiles with a specific permission

Oracle database is generating logfiles as 660 permission on hp-ux 11v2.
We want to change it to 664 during generation.
Any solution (umask or something else)?
4 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: How to force oracle to generate logfiles with a specific permission

Hi Leonard:

Two things come into play when a file is created. When a 'create()' system call is performed, the code has the option of specifying an octal permissions value. The shell uses 666 for files. Whatever value is supplied is subject to the application of the 'umask' of the process. Hence if the 'umask' is 022 and the default permissions for the 'create()' are 666, the "subtraction" of the two means that the created file will have permissions of 644. With a creation mask of 666 and a 'umask' of 002, the file has permissions of 664.

If the code performing the file creation uses a creation mask of 644 (instead of 666), then even with a 'umask' of 000, a resulting file will have permissions of 644.

Thus, the creating code has the "upper limit" of the least restrictive permissions that will apply.

In your case, try setting the 'umask' under which the Oracle processes run to '002'.

Regards!

...JRF...
Leonard C.
Frequent Advisor

Re: How to force oracle to generate logfiles with a specific permission

I changed umask in oracle profile.
But logfiles still are beeing generated with previous style.
Any idea?
Fred Ruffet
Honored Contributor

Re: How to force oracle to generate logfiles with a specific permission

oracle must be restarted, as umask is set by processes at startup, and logfiles are created by oracle lgwr process.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Leonard C.
Frequent Advisor

Re: How to force oracle to generate logfiles with a specific permission

Hi Fred,
The oracle is restarted. But the problem is that oracle log files are being generated with the various permissions.
For example alert log file is different to trace files.