I’m running OpenSuse 11.0 in a lamp configuration with Apache 2. I configured Apache with the .conf files instead of YAST because I am running virtual hosts (that’s another story).
My problem is that my server will not render the pages unless the permissions are set to 775 which I know is not necessary. This is also causing a problem because I am trying to install WordPress onto the server. WordPress will run, but it unable to upload images because it cannot create the directories required.
Apache2 is running as 755 with root as owner and www as group.
I changed the owner of the htdocs sub-directories to myself, and created a group that has permissions to write to the directory. WordPress runs as my user and has the same permissions (775).
This means that it starts as root, but that it degrades it work horses to wwwrun:www. This means that where it wants to read files from your system, they must be readable (directories also searchable) by wwwrun. Most simple is of course to make them owned by wwwrun:www and readable (searchable) for the owner. Also mind that the directories in the path to the root of these files (mostly owned by root:root) are readable (and searchable) by the world.
The big problem I am having is that when I upload files the permissions are 600. I have to manually change them to 775 for Apache to serve the file. Otherwise there is an access forbidden - 403 error.
It’s not such a hardship to chmod in the FTP program, but I am trying to install WordPress, which gets installed in whatever sub directory of htdocs you choose. WP should run as long as it has the same owner as htdocs. But it is unable to create directories or files.
Seems like this is a Suse problem - or at least my installation since I am able to upload and install WordPress on other web servers not related to this one without any problems.
You have some strange ideas there about how processes, ownership and permissions interact that it’s hard to know where to start to disabuse you of your misconceptions.
Simplest is to let the ftp program chmod to 644. The owner on the WP files is not relevant as long as the files are readable because Apache runs as wwwrun:www.