Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th December 2006, 13:13
normdouglas normdouglas is offline
Junior Member
 
Join Date: Dec 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Joomla & MySql config and chmod permissions

Hey all, just new to ISPCONFIG and just love it already. I have been developing in Joomla for awhile now and I think I have a little problem I hope others have had before.

I seem to have an FTP and MYSQL permissions problem, and although I've been able to fix it with various chmod commands I don't think it's ideal from a hosting point of view. Not that I'm going to be running a commercial hosting platform but I am going to be setting up accounts for students and need them to be able to do most of this themselves.

I think the problem relates to the fact that the MYSQL db that ISPCONFIG creates doesn't use the user account the site relates to. Consequently when Joomla tries to create the files etc it has permission problems. I've googled quite a bit and found a very good tutorial which suggested to chmod the web directory to www-data:www-data, which certainly fixed the problem, but I'm not convinced this is the best way. Because the doesn't allow Joomla modules such as the brilliant Joomla Xplorer to have full control over the folders via a web interface. I have other Joomla sites hosted on commercial servers and it all works without a problem.

I'm no Linux pro but I can stumble my way around, and I think the problem stems to the fact that when you create a MYSQL db from within ISPCONFIG it doesn't appear to use the account that is the owner of the web directory of that site. Then when Joomla takes the MYSQL account, it doesn't have control over the web directory.

I hope I have made myself understood?

So my question is...
1. Am I doing something wrong?
2. How can I make the MYSQL db use the same account as for the web directory.

Really hoping some of you ISPCONFIG gurus read this, sorry for the longwinded but I'm sure I'm not alone here, as I have found a lot of articles on how to chmod Joomla directories in an ISPCONFIG environment.

Thanks in advance
Reply With Quote
Sponsored Links
  #2  
Old 26th December 2006, 13:24
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Default

I've written the howto "Joomla on an ISPConfig server within 10 easy steps" here:
http://www.howtoforge.com/joomla_ispconfig

Within this howto for security reasons i have chosen to use www-data instead of using chmod 777 for example.

Maybe i do not answer your question exactly, but I host a lot of Joomla sites myself and personally i have a good experience with the permission-settings mentioned here:

chgrp www-data administrator/backups
chgrp www-data administrator/components
chgrp www-data administrator/modules
chgrp www-data administrator/templates
chgrp www-data cache
chgrp www-data components
chgrp www-data images
chgrp www-data images/banners
chgrp www-data images/stories
chgrp www-data language
chgrp www-data mambots
chgrp www-data mambots/content
chgrp www-data mambots/editors
chgrp www-data mambots/editors-xtd
chgrp www-data mambots/search
chgrp www-data mambots/system
chgrp www-data media
chgrp www-data modules
chgrp www-data templates

chmod g+w administrator/backups
chmod g+w administrator/components
chmod g+w administrator/modules
chmod g+w administrator/templates
chmod g+w cache
chmod g+w components
chmod g+w images
chmod g+w images/banners
chmod g+w images/stories
chmod g+w language
chmod g+w mambots
chmod g+w mambots/content
chmod g+w mambots/editors
chmod g+w mambots/editors-xtd
chmod g+w mambots/search
chmod g+w mambots/system
chmod g+w media
chmod g+w modules

And yes, sometimes filefolders are not accessible via FTP.
This means that it this setup is not so comfortable for the webmaster, but security comes first.
__________________
Hans

MrHostman | Managed Hosting

Last edited by Hans; 26th December 2006 at 14:37.
Reply With Quote
  #3  
Old 26th December 2006, 14:49
fobicodam fobicodam is offline
Senior Member
 
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to fobicodam
Default

The only way ive found to run joomla / mambo or another php package (not developing.. its funny) is to have a copy of sources on another folder, por example:

/home/software/joomla
/home/software/mambo
/home/software/phpbb
/home/software/oscommerce
/home/software/claroline

Owned by apache:apache..

Then, when some client want some of this packages, i just copy it inside the web folder.. then all run smoothly... ftp access, modules install, everything "perfect"...
Reply With Quote
  #4  
Old 26th December 2006, 22:50
normdouglas normdouglas is offline
Junior Member
 
Join Date: Dec 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't find apache

I read this too, but I can't find the user apache on the server. I have a standard Ubuntu install and I'm using Webmin to administer it.

Thanks for the replies
Reply With Quote
  #5  
Old 27th December 2006, 12:59
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,041
Thanks: 841
Thanked 5,660 Times in 4,467 Posts
Default

I guess the user is called www-data on your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 27th December 2006, 13:35
normdouglas normdouglas is offline
Junior Member
 
Join Date: Dec 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by fobicodam
The only way ive found to run joomla / mambo or another php package (not developing.. its funny) is to have a copy of sources on another folder, por example:

/home/software/joomla
/home/software/mambo
/home/software/phpbb
/home/software/oscommerce
/home/software/claroline

Owned by apache:apache..

Then, when some client want some of this packages, i just copy it inside the web folder.. then all run smoothly... ftp access, modules install, everything "perfect"...
So do you mean that you then copy whilst logged in a either admin or sudo? Because I still don't understand how the folders get the right permissions.

Every other site I have either setup and or administer via a commercial hosting solution uses the same account for both the MYSQL and the FTP account. Wouldn't this be easier, surely there is a way to do this? Why does the MYSQL require yet another unix account?

Cheers
Reply With Quote
  #7  
Old 27th December 2006, 13:39
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,041
Thanks: 841
Thanked 5,660 Times in 4,467 Posts
 
Default

Quote:
Every other site I have either setup and or administer via a commercial hosting solution uses the same account for both the MYSQL and the FTP account. Wouldn't this be easier, surely there is a way to do this? Why does the MYSQL require yet another unix account?
You can do this in ISPConfig as well, but then you must run your server with SuPHP instead of mod_php. There are several thraeds about suphp configuration in the forum, if you want to try this.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:02.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.