LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Apache and php + chmod 644 (https://www.linuxquestions.org/questions/linux-general-1/apache-and-php-chmod-644-a-102395/)

daveo 10-10-2003 05:22 AM

Apache and php + chmod 644
 
I'm having problems with the following:

My apache server (in a test environment) runs as process user apache. My document root is like:

Owner:
apache.apache

My access rights are chmod 644 (which should actually be 600) but I don't care about reading on my server.

When I'm accessing my page is say's access denied, and the only way to resolve this, is add x rights, which should not be needed. I'm using apache2 and php version 4.3.3

Does anybody know what i've done wrong ?

Dave

hw-tph 10-10-2003 08:16 AM

Well you would want execute permissions on directories the apache user should be able to list (chmod o+x) since that's what the execute bit means when it comes to dirs.

If the file isn't accessed directly as, say http://blah/index.html and the server isn't allowed to list the root dir for index.* files you would get an access denied.

hw

daveo 10-10-2003 08:33 AM

Quote:

Originally posted by hw-tph
Well you would want execute permissions on directories the apache user should be able to list (chmod o+x) since that's what the execute bit means when it comes to dirs.

If the file isn't accessed directly as, say http://blah/index.html and the server isn't allowed to list the root dir for index.* files you would get an access denied.

hw

First: The website works, but not anymore when I've changed the accessrights. So I assume that part works correctly

In the mean time i did:

chmod 777 for only the dir where the files are located(wide open). Then on the files I did a chmod 644 because an .php file only needs read if I understand well. The .php don't need to be executed as far as I know, because php parses the file himself.

Now as soon as I leave the x away it's not working. ...


All times are GMT -5. The time now is 10:25 AM.