2

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?

1 Answer 1

0

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

http://docs.cpanel.net/twiki/bin/vief/EasyApache/Apache/ModSuPHP

1
  • 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... Apr 30, 2014 at 7:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .