title: UTL_FILE FAILS WITH ORA-29283: INVALID FILE OPERATION FROM JDBC APPLICATION/WORKS FINE FROM SQL*PLUS
body: <p>We get the below error while writing file on OS with utl_file package from our application in our PROD environment. The application (which is hosted on IBM WAS) connects to database via JDBC which in turn use the <code>sys.utl</code> file package to write the files on OS. </p>
  
  <pre><code>ORA-29283: invalid file operation 
  ORA-06512: at "SYS.UTL_FILE", line 536 
  ORA-29283: invalid file operation 
  </code></pre>
  
  <p>The same thing works fine in UAT which has the same setup as PROD</p>
  
  <p>The same operation works on backend from the sql prompt or the batch jobs running. We already checked the below </p>
  
  <ol>
  <li>UTL_FILE is working with backend call on the database server.</li>
  <li>Server User/Group Privileges check between PROD &amp; UAT which is in sync.</li>
  <li>LDAP User/Group Privileges check between PROD &amp; UAT which is in sync.  </li>
  <li>Directory level permission check between UAT &amp; PROD server, which are identical.  </li>
  <li>Database User Permission &amp; Privileges.</li>
  </ol>
  
  <p>It gives the same error with 777 privileges.</p>