securing home directories and using public_html

Paul Howarth paul at city-fan.org
Wed Apr 26 07:11:53 UTC 2006


On Tue, 2006-04-25 at 15:04 -0500, Steve Strong wrote:
> Sorry if this has already been asked and answered, but I'm a newbie!  
> Maybe there's an archive I can search...
> 
> I run a lab of fedora 5 clients and a RHEL 4.0 server (that means that 
> the version of SELinux running on the server is the same as the version 
> running on fedora core 3, right?) in a high school CS department.  I'm 
> teaching a unit on web programming using php and mysql.  I've given 
> students a world-readable public_html directory and a database, user and 
> password.  All works well until I notice students copying code from each 
> other's public_html directories.
> 
> Is there a way to allow httpd to access these directories and not allow 
> users to get to them from their console?

Can't you do this using regular Unix permissions?

Have the public_html directory owned by the student, group apache, mode
750. So the student can read and write to it, the web server can read it
and other students can't do either.

Paul. 




More information about the selinux mailing list