Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th June 2006, 18:37
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
Thumbs down Mambo, Joomla, PHPNuke, etc...

The only way i found to run them (and a lot more packages) was to chown the folder where they will be running to apache:apache, then chmod them to 777.

Is it the only one way?
Reply With Quote
Sponsored Links
  #2  
Old 6th June 2006, 21:49
IntnsRed IntnsRed is offline
Member
 
Join Date: Nov 2005
Posts: 49
Thanks: 1
Thanked 1 Time in 1 Post
Default

That's to be expected. Many CMS's need the ability to write into a subdirectory and the problem then becomes a file system permissions issue.

As you point out, one or the other techniques (or both) will solve it:

* Do a chmod 777 on the subdirectory that needs to be written into. There are, of course, some security concerns with giving world-write access like this.

* Change the ownership of the subdirectory to whatever user/group Apache is running as (this varies depending on the particular distro used).

Myself, I prefer the latter technique, though the former is "easier".
Reply With Quote
  #3  
Old 6th June 2006, 21:55
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,194
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

Quote:
Originally Posted by fobicodam
The only way i found to run them (and a lot more packages) was to chown the folder where they will be running to apache:apache, then chmod them to 777.

Is it the only one way?
No, thats the easiest but most insecure way.

The better solution is to run the PHP scripts under the webadmin user with either SuPHP or SuEXEC + CGI-PHP or PHP as fastcgi.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 6th June 2006, 22:06
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

Quote:
Originally Posted by till
No, thats the easiest but most insecure way.

The better solution is to run the PHP scripts under the webadmin user with either SuPHP or SuEXEC + CGI-PHP or PHP as fastcgi.
mmm but can i choose diferent users for every virtual site? thats the way ill do it on windows, but i dont know if apache can do it.

About the chmod and chown, they only run fine if i do both.. i dont know why..
Reply With Quote
  #5  
Old 6th June 2006, 22:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,194
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

Quote:
Originally Posted by fobicodam
mmm but can i choose diferent users for every virtual site? thats the way ill do it on windows, but i dont know if apache can do it.
That's the purpose of the setups I listed above.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 6th June 2006, 22:23
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

Quote:
Originally Posted by till
That's the purpose of the setups I listed above.
Haaa , ok, anyway i dont understand :-P as you can see im a windows developer, im here just because windows has no secure email server...

But.. what you say is running the site under the vsite admin user, can ispconfig create this configuration? what happens if the admin user change?
Reply With Quote
  #7  
Old 6th June 2006, 23:14
IntnsRed IntnsRed is offline
Member
 
Join Date: Nov 2005
Posts: 49
Thanks: 1
Thanked 1 Time in 1 Post
Default

It'd be unusual for that user to change; off the top of my head the only way that user would change is to delete the account and recreate it.

Try this:

Do a cd into the user's "web" subdirectory, e.g. "cd /home/www/web2/web".

Get the ownership of the files there

Code:
ls -l index.php
-rw-r--r--  1 web2_intnsred web2 5831 Jan 17 20:41 index.php
From the above we see that the username is "web2_intnsred" and the group is "web2".

The directory can then be chown'ed to that user/group with a "chmod web2_intnsred:web2 DirectoryToChange" command.
Reply With Quote
  #8  
Old 7th June 2006, 02:56
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

Quote:
Originally Posted by IntnsRed
It'd be unusual for that user to change; off the top of my head the only way that user would change is to delete the account and recreate it.

Try this:

Do a cd into the user's "web" subdirectory, e.g. "cd /home/www/web2/web".

Get the ownership of the files there

Code:
ls -l index.php
-rw-r--r--  1 web2_intnsred web2 5831 Jan 17 20:41 index.php
From the above we see that the username is "web2_intnsred" and the group is "web2".

The directory can then be chown'ed to that user/group with a "chmod web2_intnsred:web2 DirectoryToChange" command.

i know, but the only way to run mambo now is seting apache as directory owner..
Reply With Quote
  #9  
Old 7th June 2006, 10:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,194
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

Quote:
Originally Posted by fobicodam
But.. what you say is running the site under the vsite admin user, can ispconfig create this configuration?
ISPCOnfig supports SuEXEC + cgi-PHP out of the box and the other configurations by adding some additional config lines in the apache directives field of the website.

Quote:
what happens if the admin user change?
Then the scripts are run under the new admin user. ISPConfig changes the admin ownership of the files automatically.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 7th June 2006, 13:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

I have written a tutorial about suPHP, if you wait a few days, you can find it on HowtoForge.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
upload fails with joomla CMS robd Installation/Configuration 7 19th July 2006 01:13
Mambo And ISPconfig Link Problem rikardo Server Operation 1 9th May 2006 16:41
Using Joomla leen Server Operation 2 1st May 2006 15:39
Perfect setup Joomla with ISPConfig ? bogdinator Installation/Configuration 22 19th January 2006 18:34
Problems installing CMS joomla ratebri Installation/Configuration 17 6th December 2005 19:33


All times are GMT +2. The time now is 18:47.


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