Link to home
Start Free TrialLog in
Avatar of keithedward
keithedward

asked on

Wrong owner when executing oracle pl/sql FOPEN?

Hello,

I have a user that is executing some pl/sql. He opoens a file with UTL_FILE.FOPEN and then writes some things and closes the file. BUT the file is owned by unix user "oracle" with a group of "dba" ??!! He is running as user "mwallace" (both in unix and oracle sqlplus) ? When he tries to edit the file, he gets permission denied... Please help!

btw...If the user spools output it will go to a file which he owns.

Thanks!
Keith
ASKER CERTIFIED SOLUTION
Avatar of syakobson
syakobson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mshaikh
mshaikh

Go to $ORACLE_HOME/bin and do the following at the unix prompt:

chmod 751 sqlplus

Then try again.
You have to be logged in as oracle to do this.
Oops, I clicked Submit to early. I forgot to explain why spool works. SQL*Plus/Server Manager command spool is executed on the CLIENT side by CLIENT process. That is why spool file is owned by client OS username. If client box is different from DB server box, spool file and UTL_FILE created file produced by the same client would end up on different boxes even if both spool command and UTL_FILE.FOPEN would use same file specification.

Solomon Yakobson.