LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 02-27-2005, 11:14 PM   #1
Davus
Member
 
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


Hi!
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-27-2005, 11:44 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

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.
 
  


Reply



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 03:53 AM
what is the webserver's (apache) default user/group on SuSe MaestroC SUSE / openSUSE 1 09-09-2005 01:15 PM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 02:05 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache 1.3 vhost z4Rilla Linux - Software 0 08-03-2003 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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