Permissions issue: how can Apache access files in my Home directory?

Posted by richzilla on Ask Ubuntu See other posts from Ask Ubuntu or by richzilla
Published on 2011-02-17T18:15:48Z Indexed on 2011/02/19 15:33 UTC
Read the original article Hit count: 218

Filed under:

I know file permissions have been covered on here before, but im struggling to get my head around the concept for my scenario.

  • I created the files on an old ubuntu installation.
  • Ive copied the files into my new ubuntu installation and put them in my webroot.
  • When i attempt to run the files (theyre PHP files) i get an error relating to permissions

in an attempt to fix this, i assumed that they must still be owned by the previous owner, so i ran chown -R on the directory, with my username as an argument, in order to take ownership of all of the files in the directory. It should be noted that the usernames between new and old ubuntu installations were the same.

When i attempt to run the files again, same problem: 500 error due to permissions problems. Can anyone tell me what other steps i should take?

The webroot for my apache installation is inside my home folder. If i create new files in my webroot, they also work as expected, its only the old files that are causing the problem.

© Ask Ubuntu or respective owner

Related posts about permissions