Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using cpanel, that runs on red hat linux, which by default runs Apache as a user called nobody. Ubuntu does something similar, but call the user www-data.

By default, when you create a new account for the user, all the files belong to the new user, so the owner might be joeblogs.

The thing is, all the php is executed by nobody, and for default config permission settings, you need to either be the owner of the files, or in the group allowed to update the files.

I've tried chowning the wordpress files to belong to nobody, which makes the auto update process easier, at the cost of letting joeblogs edit his files as easily.

What's the simplest, most maintainable way to allow a user, joeblogs AND the apache user, nobody to update all the files in an account directory, to let them keep their wordpress install up to date easily, while still having as much control over their space as possible?

Thanks

share|improve this question

3 Answers 3

You could do this with acls. Probably the simplest way though is to swap from mod_php to su_php, so that wordpress is executed by joeblogs, rather than nobody.

share|improve this answer
    
Or run PHP as a (Fast)CGI script. –  duskwuff Sep 7 '09 at 0:08
    
su_php sounds like a really simple solution to this - other than wordpress being executed by joeblogs, is there anything else to bear in mind here on a stock cpanel install, like any whether this would normally break any mail functions that wordpress uses? –  Chris Adams Sep 19 '09 at 12:07
    
I haven't found it breaks anything wordpress uses out of the box. Never used cpanel however. –  Cian Sep 19 '09 at 13:08

The provider I have my blogs hosted on currently utilizes PHP ran through suExec so that it runs as my user ID rather than the user that Apache runs as. This has worked out great and allowed me to manage Wordpress without any problems. In the past I was maintaining upgrades by hand as I moved the wp-content directory out of the way so I could overwrite the rest of the wordpress/ directory during upgrades and still keep my plugins and themes. I just made a symlink to the wp-content/ directory outside of wordpress/. With suExec ran PHP I no longer have any need to maintain this separation and have been able to upgrade quickly and smoothly without any problems.

share|improve this answer

Wordpress is designed for this. When a user goes to the update screen it asks for ftp login credentials so it can just ftp in as joeblogs and manage the files that way.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.