This content has been marked as final. Show 9 replies
There was no bug number associated with the umask issue (it was fixed as part of another bugfix) and that issue only occurred when external jobs were being used. That bug was fixed in 11.1 and the fix was also backported to 10.2.0.4 so if you are really running 10.2.0.4 then this may be a different issue.
Can you post some more information -
Is this an external or a regular pl/sql job ?
Are you sure the version is 10.2.0.4 ?
Is this a run_job or a regular scheduled background job run ?
Are there any external jobs in use on the system ?
If you could post a simple test case, that would also be useful.
Yes, 10.2.0.4 for sure.
It happens with chain-based scheduler jobs, and i tested with a run_job-executed plsql_block job as well -- same result.
I also use external jobs but they're configured to use a user and group other than nobody:nobody or oracle:something-or-other. This is actually a problem of not being able to read files generated by utl_file when trying to scp them with an external job that runs as this different user. The external job can't run as oracle for various reasons, including that it has to access files owned by a different user as well.
I'll post my test case on monday.
More information ...
umask for oracle is 0022.
I have a development and a production database on the same host, and the behaviour for each of them is different (typically it is the production one that produces the wrong file privileges) -- they use the same ORACLE_HOME however. So maybe not a bug but a configuration issue? There do not seem to be any relevant differences in the init parameters. Can you think of anything else which might affect this?
Here's my test code.
Note that even when running the job with use_current_session = TRUE this problem still occurs, and it only occurs on one database out of the two that share that ORACLE_HOME.
declare file_id utl_file.file_type; begin file_id := utl_file.FOPEN( 'NCBI_PROBE_DIR', 'test_synchronous.txt', 'w' ); utl_file.fclose(file_id); end; / begin dbms_scheduler.create_job( job_name => 'test_file_write', job_type => 'PLSQL_BLOCK', job_action => 'declare file_id utl_file.file_type; begin file_id := utl_file.FOPEN( ''NCBI_PROBE_DIR'', ''test_scheduler.txt'', ''w'' ); utl_file.fclose(file_id); end;', enabled => true, auto_drop => true); dbms_scheduler.run_job( job_name => 'test_file_write', use_current_session => true); end; /
Opened a case with support to see what they think.