Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-28-2005, 12:14 AM   #1
Registered: Jul 2004
Location: Mesquite, Texas
Distribution: currently retired
Posts: 31

Rep: Reputation: 15
Apache 2.0.53, vhost, each having its own user:group

I've been looking all over Google and the Apache manual, all to no avail.
Basically, I don't want the Apache server to run all settings as a single user. Linux is a multi-user environment, after-all.
It wouldn't be a problem to set up, but the server runs PHP. Thus a user could just write a PHP script to fopen() and read other user's files in their webspace, including config.php

I've been tampering with httpd.conf for a few days trying to make each have their own vhost, derived from their shell username, but instead it insists on taking on just one, etc.
I've tried multiple NameVirtualHost's with User and Group below, etc.

Have any webhosts managed to set this up properly without cpanel, whm, and webmin, etc? I'm considering just reading an httpd.conf of a random webhost or something.
Old 02-28-2005, 12:44 AM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,288

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
The way I do this is to run PHP as a CGI binary (instead of as an Apache module) and then use the SuExecUserGroup directive within the vhost configuration (this will apply to all CGI scripts). You'll need to have suexec support built into Apache for this to work. There's also a phpSuExec project that can be used to set this up (also works as a CGI IIRC).

Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with a user group and apache javier_ccs Linux - Software 7 07-28-2011 04:53 AM
what is the webserver's (apache) default user/group on SuSe MaestroC SUSE / openSUSE 1 09-09-2005 02:15 PM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 03:05 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 06:30 AM
apache 1.3 vhost z4Rilla Linux - Software 0 08-03-2003 07:44 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration