1834459 Members
2732 Online
110067 Solutions
New Discussion

Permission problem

 
SOLVED
Go to solution
Verónica Muñoz Segovia
Frequent Advisor

Permission problem

Hello,

I have a permission problems in two servers that runs Oracle Databases.

I setup the same .profile file in both servers:

(last lines in .profile oracle account)

umask 022
export ORACLE_BASE=/usr/oracle
export ORACLE_HOME=/usr/oracle/product/8.1.7
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export ORA_NLS33=/usr/oracle/product/8.1.7/ocommon/nls/admin/data
export ORACLE_SID=db
export PATH=:/usr/ccs/bin:/usr/oracle/product/8.1.7/bin:/usr/bin:/etc:/usr/sbin:/usr/bin/X11:$PATH

The last lines for the oracle account in the other server with Oracle 9i:

umask 022
export ORA_BASE=/usr/oracle
export ORACLE_HOME=/usr/oracle/product/Oracle9i
export ORACLE_SID=db2
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export ORACLE_NLS33=/usr/oracle/product/Oracle9i/occommon/nls/admin/data
export ORACLE_RUN=/usr/oracle/admin

Using an oracle store procedure, they generate some files under a directory, and the files are created with different permission:

Server 1:
-rw-rw-r--

Server 2:
-rw-r--r--

How could I fix that behavior?

Thanks in advance,

Vero.

Always is important to know the opinion of other people with or without experience
2 REPLIES 2
Steven E. Protter
Exalted Contributor
Solution

Re: Permission problem

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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Brian Markus
Valued Contributor

Re: Permission problem

We had the exact same issue. Have your stored procedure call a script with the umask command in it.

Hope this helps

-Brian.
When a sys-admin say's maybe, they don't mean 'yes'!