Working on getting a 19c installation working on RHEL 7.8. The database works, but we're having a problem with files created using the UTL_FILE package. They're being created with -rw-r--r-- (644) permissions - but we need them to be -rw-rw-r-- (664). This works fine for us on our current system (Oracle 11.2 on HP-UX), but of course no one who currently works for the company was involved in the earlier installs and setups, yada-yada, etc-etc. Sysadmins are playing with umask settings but my understanding (which is shaky) is that umask can be used to turn permission bits off but not on. Just to make it a little more fun, the database server is separate from the file/application server, with the files created by UTL_FILE being made available on the app server via NFS. However, I'm given assurances by our DBA's that the files on the database server have 644 permissions (I do not have access to the database server) which is what we're seeing on the app server side.

Can anyone suggest a way to have 19c UTL_FILE create files with permissions set to 644?

1 Answer 1


This depends on how you use UTL_FILE and what setup you have. Do you create files using UTL_FILE from scheduled jobs/preallocated databases processes or from databases processes spawned through the listener? Is this a RAC or single instance database? If single instance, is Grid Infrastructure in use or not?

Simplest case: single instance without Grid Infrastructure. Here just set umask to the desired value before starting the listener and the database interactively in the shell or the script used for that.

Different Permission When the Data File is Created/Added Remotely (Doc ID 961568.1)

With Grid Infrastructure: set the necessary setting as described in How to set the permission of the files created by listener using UTL_FILE on RAC(11.2-) env. (Doc ID 1980622.1)

srvctl setenv listener -t ORA_RDBMS_UMASK=002

Then restart. This sets the umask only for remote sessions connecting through the listener which spawns their processes. For scheduled jobs or shared servers or DRCP, you will need more than this.

srvctl setenv database -d orcl -t ORA_RDBMS_UMASK=002

I never tried this for the database resource in 19c. I guess it should work, but I leave the testing for you now.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.