View Single Post
  #1  
Old 29th May 2010, 00:00
jumba jumba is offline
Member
 
Join Date: May 2010
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default [SOLVED] suPHP and suEXEC broken by default in Ubuntu 10.04 Perfect Server

I followed the Ubuntu 10.04 perfect server guide and installed ISPConfig 3.
I want to install Joomla so I created a website with suEXEC + PHP Fast-CGI and another site with suPHP.

Neither suEXEC + PHP Fast-CGI nor suPHP work correctly by default.
If I upload a file via FTP it will be owned by the correct owner (like web1) but any file created by Joomla will be owned by www-data.

If you try to install Joomla you will see an error at the beginning saying that configuration.php is not writable.
If you change the permissions of /web from the default value of 710 to 777, Joomla can write to configuration.php but the owner will be www-data.
You can now continue installing Joomla but you cannnot install anything from within Joomla since all the files it tries to create are owned by www-data.

The first thing you notice when you connect to your site's account with ssh or FTP is that some of the default permissions are wrong.

in /var/www/clients/client1/web1 all files and directories are owned by web1 (group client1)
/.cache is 755
/cgi-bin is 751
/log is 777
/tmp is 777
/web is 710
.bash_history is 755

in /web the /stats directory has 755 but it is owned by root.
The are other files from /web are owned by web1 client1 but their permissions are 754 not 644

So, there is absolutely no difference between a site with suPHP and another one with suEXEC + Fast-CGI. They both have the same default permissions and any file created by Joomla is owned by www-data.

Any suggestion on how to fix this?
The permissions are OK in Ubuntu 8.04 with ISPConfig 3 and suPHP.

Last edited by jumba; 6th June 2010 at 20:02.
Reply With Quote
Sponsored Links