Re: UTL_FILE.INVALID_OPERATION (trying to open file)

From: Bruno S Fernandes <bruno-s-fernandes_at_telecom.pt>
Date: Fri, 22 Jan 1999 18:41:27 -0000
Message-ID: <78agoq$ese$1_at_pthp35.telecom.pt>


Read this and i believe it will help you: "The PL/SQL file I/O feature is available for both client side and serverside PL/SQL. The client implementation is subject to normal operatingsystem file permission checking, and so does not need any additionalsecurity constraints. But the server implementation might be running ina privileged mode, and so will need additional security restrictions thatlimit the power of this feature. Note: The UTL_FILE package is similar to the client–sideTEXT_IO package currently provided by Oracle ProcedureBuilder. Restrictions for a server implementation require someAPI differences between UTL_FILE and TEXT_IO. In PL/SQLfile I/O, errors are returned to the caller using PL/SQLexceptions. Server security for PL/SQL file I/O consists of a restriction on thedirectories that can be accessed. Accessible directories must bespecified in the instance parameter initialization file (INIT.ORA).You specify the accessible directories for the UTL_FILE functions in theinitialization file using the UTL_FILE_DIR parameter, as follows:UTL_FILE_DIR = <directory name> For example, if the initialization file for the instance contains the lineUTL_FILE_DIR = /usr/jsmith/my_appthen the directory /usr/jsmith/my_app is accessible to the FOPENfunction. Note that a directory named /usr/jsmith/My_App would not beaccessible on case–sensitive operating systems.The parameter specificationUTL_FILE_DIR = *has a special meaning. This entry in effect turns off directory accesschecking, and makes any directory accessible to the UTL_FILEfunctions. Warning: The ’*’ option should be used with great caution.For obvious security reasons, Oracle does not recommend thatyou use this option in production systems. Also, do not include’.’ (the current directory for UNIX) in the accessible directorieslist."
Taken from "ORACLE 7 Server Application Development" Regards,
  Bruno S Fernandes <bruno-s-fernande_at_telecom.pt> Received on Fri Jan 22 1999 - 19:41:27 CET

Original text of this message