Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2002 21:32:26 -0700
From:      James Pye <jwp@rhid.com>
To:        FreeBSD ISP List <freebsd-isp@freebsd.org>
Subject:   Re: per-user groups
Message-ID:  <20021113043225.GA83041@void>
In-Reply-To: <20021112201947.GA28569@users.munk.nu>
References:  <20021105130922.A36056@cthulu.compt.com> <20021110214410.GA98103@users.munk.nu> <20021112085654.GA55722@blazingdot.com> <20021112201947.GA28569@users.munk.nu>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
greetings,

	suEXEC wrapper seems to solve the problem about running CGI scripts as the www user.  you can use the User and Group directives inside <VirtualHost> with the suEXEC wrapper enabled.
	tho, wouldn't it be useful to spawn httpd processes serving a virtualhost's pages as the User and Group specified within <VirtualHost>? suEXEC apparently only affects cgi scripts.. perhaps i am missing something tho...(this would solve the problem without placing the www user in the user's group)
	of course, there are security considerations involved with using suEXEC...

	http://httpd.apache.org/docs/suexec.html

-james

On 11/12/02:45/2, Jez Hancock wrote:
> Date: Tue, 12 Nov 2002 20:19:47 +0000
> From: Jez Hancock <jez.hancock@munk.nu>
> To: FreeBSD ISP List <freebsd-isp@freebsd.org>
> Subject: Re: per-user groups
> 
> On Tue, Nov 12, 2002 at 12:56:54AM -0800, Marcus Reid wrote:
> > Another way to do almost the same thing is to have the users home
> > directory perms set to rwxr-x--x. Apache can get to the users public_html
> > directory, and noone can get a directory listing of another persons home
> > directory. Users still have to make sure that files they don't want to
> > be world readable aren't world readable, but it's a solution that suits
> > my tastes a little better.
> This is how I had my system setup until a few days ago, the nice thing about
> it being if one user in a shell wants to let another user look at a file they
> can just say 'have a look at /home/myhome/file' and providing the perms on
> 'file' are right, the other user can still see the file even though they
> can't actually run a listing on the directory /home/myhome.
> 
> Obviously though this runs the risk of letting user's guess the location of
> important files in a shell (which was why I moved away from this setup) - say by
> attempting to read commonly used names for config files, ie:
> 
> 'cat /home/another/web/include/config.php'
> 
> Regarding what you say about user's being able to use the fact the 'www' user is
> in all user groups to write malicious scripts to read / traverse directories outside
> their own home dir - I know you can setup PHP to stop this (using the open_basedir
> and safe_mode php.ini settings for example), but how do you do similar for cgis?
> 
> Incidentally I'm having hassles getting that setup I suggested to work, it's totally
> baffling.  I'm sticking with the method you mention Marcus for now ;)
> 
> Regards,
> 
> Jez
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE90dXZnbjJW1rXbm8RAuDgAJ4uxKfTqF60RCrxjI5KRk2wTkxKqQCgoN1O
7XPuvCttMP55h4HxP6lMF3M=
=nL1L
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021113043225.GA83041>