title: LAMP: Recommended Directory and File Permissions
body: <p>My project resides in a shared Linux hosting server. The hosting provider, of course, has already set up the necessary directory and file ownerships relative to other server users. My concern for now is how to setup permissions within my domain so my users can have read access to the files and folders they should have and still let my scripts retain read/write access to it.</p>
  <p>Question: What would be the recommended permissions on:</p>
  <ol>
  <li><p>Public files and folders (read only?)</p>
  </li>
  <li><p>Files where uploaded files from forms are stored</p>
  </li>
  <li><p>Files and folders where GD and cache files are being written into</p>
  </li>
  <li><p>Folders where my server-side scripts are stored (I used mainly PHP)</p>
  </li>
  <li><p>My WWW root folder (where <code>index.php</code> resides)</p>
  </li>
  </ol>