Merde

Using suexec and mod_fcgid

suexec

Since setting up our new server, I’ve been trying to figure out user/group permissions. I wanted WordPress to be able to write to the server (to create thumbnails, update plugins, etc), and at the same time I wanted to be able to write to the server logging in as my user in Transmit. I had resolved to setting the user/group to www-data (the Apache user, so WordPress could write to the server). Then I added myself to the group www-data and set the permissions for all the files to 775.

That worked. But it didn’t seem right. On our shared server before this it wasn’t like this. This is when I discovered using suexec and mod_fcgid. Using suexec PHP can run as my user. That way I can have the correct file permissions and be the owner of my files. It took me a while to find information on how to set this up, and once I did I was definitely confused at points. I based my work on two tutorials.

The first tutorial I worked with was on HowtoForge. I skipped the steps on installing Apache and setting up virtual hosts. I followed the other instructions pretty closely. But once I had finished, the server was throwing up 500 errors.

The second tutorial I found to help me with where I hadn’t succeeded. The steps were fairly similar. The one difference I noticed that fixed my problem was to make the php-fcgi-starter executable. Wow. Simple. chmod a+x