title: move_uploaded file:failed to open stream: Permission denied in /srv/http/upload.php
body: <p>I am trying to run a server on ArchLinux, I have apache and PHP running normally, but i can't upload a file with PHP. I have seen many questions of this sort on Stackoverflow and I seem to have used all the suggestions I found, but I still get a </p>
  
  <pre><code>failed to open stream: Permission denied in /srv/http/upload.php 
  </code></pre>
  
  <p>error.</p>
  
  <p>To be precise</p>
  
  <pre><code>Warning:  move_uploaded_file(): Unable to move '/tmp/phpZvJK1l' to '/home/administrator/SCRIPTS/tr/solution.cpp' in /srv/http/upload.php on line 20
  </code></pre>
  
  <p>I set the permissions for /tmp/, /home/administrator/SCRIPTS/tr and /srv/http to 777 (I know thats not right, but I am working locally right now and I want to get it working somehow).</p>
  
  <p>Also I set all the owner of these directories to http (that is the user running PHP), but the thing still doesnt work.</p>