0

I want to access some files in a folder that I created in a server. I have changed the file permissions recursively to 755, which basically should allow everyone to read and execute files, but this is not true, because when I try to access it I get the following error:

You don't have permission to access /~dossan/wa-ex3 on this server.

Apache/2.2.3 (CentOS) Server at atelier.inf.usi.ch Port 80

The folder that I created wa-ex3 is inside another folder called public_html (so the actual path would be /~dossan/public_html/wa-ex3), but usually I do not have to specify the name of this folder in the path. Note that even if I try the path /~dossan/public_html/wa-ex3 I get a similar error.

Note also that if I do ls -l I get that all files have one of these configurations -rwxr-xr-x or drwxr-xr-x.

What could cause this problem?

  • 2
    Who owns public_html? – eyoung100 Oct 8 '15 at 20:09
  • @eyoung100 I mean dossan (which should be my account at the server). It has the same permissions, 755. – nbro Oct 8 '15 at 20:43
  • this is almost certainly an apache configuration issue, not file permissions. Is your apache configured for Userdir? see httpd.apache.org/docs/trunk/howto/public_html.html – cas Oct 8 '15 at 22:03
  • @cas The problem, I forgot to mention maybe, is that I can access other folders that I had before under public_html, only this one that I have just created is not accessible... – nbro Oct 8 '15 at 22:10
  • Have you changed the perms on your home directory, or on any of the parent directories about it? apache needs r-x access on all directories in the path to the document....e.g. /, /home, /home/dossan, /home/dossan/public_html, and /home/dossan/public_html/wa-ex3 – cas Oct 8 '15 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.