title: File permission problems with PHP
body: <p>I am trying to create a folder and <code>fopen</code> a file inside that folder.</p>
  
  <p><code>mkdir</code> works fine for creating the folder (as the parent folder has 777 permission), but the resulting folder is owned by user id 99 while the script itself is running under cpanel with user id 32024. Now when I try to create a file inside this folder, I get:</p>
  
  <blockquote>
    <p>SAFE MODE Restriction in effect. The script whose uid is 32024 is not allowed to access /&lt;path_of_file&gt;/&lt;folder_created_by_php&gt; owned by uid 99</p>
  </blockquote>
  
  <p>This error is fully justifiable as I am trying to write to a folder owned by someone else but how can a script running under 32024 create a folder with owner as 99? Anything wrong with the way server is behaving? Any ideas?</p>