LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-25-2008, 07:26 AM   #1
utw-mephisto
Member
 
Registered: Apr 2005
Posts: 93

Rep: Reputation: 16
Apache and SuExec checking for uid only


Hiya,

we run several hundred websites on one specifc server running Apache and PHP as CGI (CentOS 5.1).
I know we could run it is modul etc., but it would be a long story why we do it that way

We do have a small problem.

Apache itself runs as user nobody and group www

So each website runs under that specific user (for example user1 : www) and the v-host file uses user1 : user1 as SuExec group ..

Can you follow me ? I have a hard time to explain lol ..

Lets assume you can follow me ...

SuExec would obviously never work as the group itself is always different when ie a file is being created through a PHP script etc.

In order to make it work, the suexec.c has been modified and the attached lines were removed for now (and compiled with it):

Code:
/*
* Error out if the target name/group is different from
* the name/group of the cwd or the program.
*/
if ((uid != dir_info.st_uid) ||
(gid != dir_info.st_gid) ||
(uid != prg_info.st_uid) ||
(gid != prg_info.st_gid)) {
log_err("target uid/gid (%ld/%ld) mismatch "
"with directory (%ld/%ld) or program (%ld/%ld)\n",
	uid, gid,
	dir_info.st_uid, dir_info.st_gid,
	prg_info.st_uid, prg_info.st_gid);
	exit(120);
	}
We have now tried to modfy those lines in order to have only the uid checked but the gid ignored .. we haven't managed to do so (just removing the gid lines doesn't work)

Does someone has a brilliant idea (apart of the obvious : removing suexec etc.)
 
  


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
apache + php suexec gimmereeson Linux - Server 0 09-18-2007 11:24 AM
Apache Suexec not working vikasumit Linux - Software 2 07-21-2006 05:49 AM
apache suexec hassan2 Linux - Software 0 08-03-2005 07:01 PM
Apache Suexec Maze the Kid Linux - Software 0 04-05-2005 04:05 PM
Apache suexec Rachel Carter Linux - Software 0 01-31-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:39 PM.

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