LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-18-2004, 12:14 PM   #1
vbfischer
Member
 
Registered: Jun 2004
Location: Tampa, FL
Distribution: CentOS 3.x
Posts: 33

Rep: Reputation: 15
Website Hosting and file/folder ownership


I am hosting several websites, mainly for friends, and friends of friends, etc. Each user has a login, so they can access their website files. I am having difficulties figuring out the best strategy for setting ownerships.

Lets say that Apache runs as the apache user. Is it best to set everything to owner:group apache:apache? I do this because its possible I have multiple users that want access to the same website. I add the users to the apache group, and make sure the files/folders are rwx for group.

I also create a mount point in their home directories to the website root so they can access the website structure without really leaving their chroot environment.

Any issues with this? Am I mucking things up?

Thanks in advance...
 
Old 06-18-2004, 12:32 PM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
You probably want to setup your apache to use suexec. This way, each virtual host will run as a particular user. So you setup a vhost for your user John Smith and put in the suexec directive telling that vhost to run as john:john.

This works out nicely for users who need to FTP to the server and upload their files. They will be logging into the server as "john" so the files that get stored are set with "john" as the owner.

All the files can be set with chmod 700 because only the owner needs access to their own stuff. No need to fool with group permissions.

Under this setup, it doesn't matter what user/group apache runs as. It can be nobody:nobody or apache:apache. Doesn't matter... the user/group is defined in the vhost directive.
 
Old 07-01-2004, 12:31 PM   #3
vbfischer
Member
 
Registered: Jun 2004
Location: Tampa, FL
Distribution: CentOS 3.x
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for your response. I'll try that out.

p.s. Sorry took so long to acknowledge response...
 
  


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
hosting my own website metallica1973 Linux - Networking 4 10-16-2005 02:49 PM
website hosting jkmartha Linux - Newbie 1 05-06-2005 04:01 AM
multiple website hosting matneyc Linux - Newbie 4 12-20-2004 03:21 PM
Need good website hosting distro Joey2619 Linux - Distributions 5 12-11-2004 04:53 PM
Hosting and other website related Advertising Forum bjdea1 LQ Suggestions & Feedback 3 09-08-2004 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:13 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