I have a trial WHM/cPanel setup on a CentOS server. Everything is working well except for one file permission error that I can't nail down.

I had edited my hosts file to redirect my domain to point at the new server and set up my php scripts and such. Everything was working great.

Then I wanted to share the link to the new server with others so I switched to using the generic cpanel url with the ip address like this: http://XX.XX.XX.XX/~username

The site still runs somewhat on this url, in the sense that it runs the right scripts. However, when accessed this way, the files are run as the main apache user (nobody) instead of running under the user for the account (in the example, username). This naturally breaks caching that tries to write files, since the folders are not writable by nobody.

Is there a good way to adjust the virtual hosts to run under the correct account when accessing the site through the ip address?


I think the feature you are looking for is suPHP. It allows scripts to run under their own user ids.


  • I do already have suPHP running. And if you access the website using the domain that is set up in cPanel, then it does run at that user. It just doesn't seem to run correctly when you access through an IP Address format. I can't imagine that it is not using suPHP then, but it runs as the wrong user... – David Fritsch Apr 30 '14 at 7:16

Your Answer

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

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