
6th June 2006, 18:37
|
|
Senior Member
|
|
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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?
|

6th June 2006, 21:49
|
|
Member
|
|
Join Date: Nov 2005
Posts: 49
Thanks: 1
Thanked 1 Time in 1 Post
|
|
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".
|

6th June 2006, 21:55
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,054
Thanks: 697
Thanked 4,245 Times in 3,258 Posts
|
|
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.
|

6th June 2006, 22:06
|
|
Senior Member
|
|
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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..
|

6th June 2006, 22:09
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,054
Thanks: 697
Thanked 4,245 Times in 3,258 Posts
|
|
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.
|

6th June 2006, 22:23
|
|
Senior Member
|
|
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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?
|

6th June 2006, 23:14
|
|
Member
|
|
Join Date: Nov 2005
Posts: 49
Thanks: 1
Thanked 1 Time in 1 Post
|
|
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.
|

7th June 2006, 02:56
|
|
Senior Member
|
|
Join Date: Apr 2006
Location: Argentina
Posts: 346
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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..
|

7th June 2006, 10:58
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,054
Thanks: 697
Thanked 4,245 Times in 3,258 Posts
|
|
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.
|

7th June 2006, 13:01
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,600 Times in 2,449 Posts
|
|
I have written a tutorial about suPHP, if you wait a few days, you can find it on HowtoForge.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 09:15.
|
Recent comments
11 hours 8 min ago
13 hours 35 min ago
1 day 1 hour ago
1 day 4 hours ago
1 day 8 hours ago
1 day 14 hours ago
2 days 4 min ago
2 days 1 hour ago
2 days 9 hours ago
2 days 11 hours ago