Hi All,
I am trying to remove a file via UTL_FILE.FREMOVE providing database directory and file name. We are runing Oracle Enterprise 12.1.0.2.0 under Suse Enterprise 11.4.
For removing of a file under Linux, only directory permissions should be relevant (file permissions are irelevant).
To test it I create a file under OS user A and remove all the permissions. The folder the file is in has full permissions. Now I switch to another OS user and delete the file via rm. Works fine...
Now I try to remove the same file in the same folder from DB via FREMOVE and get
Error report -
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 251
ORA-06512: at "SYS.UTL_FILE", line 1230
ORA-06512: at line 3
Why?
Providing write permissions to the above mentioned file fixes it. I am wondering for what Oracle needs write permisison the the file it is deleting?
Oracle documentation says:
This procedure does not verify privileges before deleting a file. The operating system verifies file and directory permissions.