Ubuntu 10 + Suexec + Fcgi + www-data Problem (Websites run a www-data not as user)

Hi I use over a year Ubuntu 8 with virtualmin Pro, all fine thanks.

Now Its time to Upgrade to Ubuntu 10 (LTS etc.) I installed a new system and get a problem where I need help.

All my Old Importet Domains run with the User www-data, thats a big Problem, I tried different offered solutions "Default PHP" Mode etc.

Nothing happend at the moment I instaled a second clean system but the same Problem, I created a test account (fresh) and don't importet my backups, but the thame my Sripts runs under www-data user not under the account user.

My old Domains runs with mod_fcgid, that was no Prob. I think its saved in the Backups. The Problem exists with a new createt Domain / account, too.

I putted "apt-get install apache2-suexec-custom" in the Terminal and it says all fine all installed. In the first system withe the Prob under Ubuntu 10 the content from "/etc/apache2/suexec/www-data" is "/home" like the standart after a fresh Virtualmin install.

Now second the install: the content from "/etc/apache2/suexec/www-data" is "/home/www/" because in the System Configuration I set the Path to "/home/www"

I have in both Systems the same prob..

Status: 
Closed (fixed)

Comments

So if you edit /etc/apache2/suexec/www-data and add /home at the top, does that fix the problem?

Sorry, no there is no change it runs as www-data, too.

So are you referring to CGI scripts that are running as www-data, or PHP scripts?

I use PHP Scripts like Typo3, joomla and Wordpress.

Curently i testet it with a simple phpinfo.php file in public_html root. It's the same it runs as www-data. Can it be a workaround to kick out the custom-suexec stuff and use the old selfcopmiled suexec file from my Ubuntu 8 system?

And on the Server Configuration -> Website Options page, is the PHP execution mode set to fcgid ?

Does switching to CGI mode help?

No, Sorry i tryed but it was not sucessful, all runs with www-data.

Is this PHP script under the domain's ~/public_html directory, or are you perhaps using Apache aliases to serve it from elsewhere?

Also, if you go to Limits and Validation -> Validate Virtual Servers and validate this domain, does it report any errors?

it runs under normal Public_html folder and Limts and Valitdation reports all fine i can use the system.

Ok, I see the cause of this now .. Ubuntu 10 configures PHP in such as way that running via mod_php overrides CGI mode.

The fix is to edit /etc/apache2/mods-available/php5.conf and comment out the line SetHandler application/x-httpd-php , and then run apache2ctl graceful

I will change the Virtualmin installer to do this for you..

Yes, that was it, thanks for your help / support. Pierre

Awesome. I was having the exact same issue.

But besides this, moving websites from one server to the next via the backup & restore procedure is very, very cool.

There's a couple more issues related to file uploads, but I haven't nailed them yet: they're next on my list

Thanks for the great work.

MD

Automatically closed -- issue fixed for 2 weeks with no activity.