LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-10-2005, 12:04 PM   #1
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Rep: Reputation: 15
The correct/secure way to setup a webserver?


I create users so they can ftp onto the server into their /home/users/username folders. I will setup apache to see each vhost in each of the folders

Example

www.example.com would be

/home/users/wwwexamplecom/www

They could login with proftp to upload their documents. Jailed to their home folder.

My only problem is allowing apache to read from their document without compromising security. How would enable apache (httpd user on my Trustix setup) to be able to read from these folders? Currently getting the typical 403 errors.
 
Old 02-10-2005, 01:11 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
httpd must have read access to the files of each user.
 
Old 02-10-2005, 01:29 PM   #3
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
Users cant write some php script then to access someone elses directory?

useradd -g users wwwexamplecom

chown -R wwwexamplecom:users /home/users/wwwexamplecom

chmod 755 /home/users/wwwexamplecom

That look ok?

Last edited by ]SK[; 02-10-2005 at 01:33 PM.
 
Old 02-10-2005, 01:55 PM   #4
Davus
Member
 
Registered: Jul 2004
Location: Mesquite, Texas
Distribution: currently retired
Posts: 31

Rep: Reputation: 15
I've had this problem too. The way ]SK[ has it set up, it'd allow all users to read files on another's webspace (configuration PHP files, etc).

I'm still not sure how to do this, but that method won't protect users from each other.

*Watches this topic, maybe I'll learn something*

Edit: Changed `webserver` to `webspace`, oops.
 
Old 02-10-2005, 02:05 PM   #5
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
Well I got these permissions from http://www.siliconvalleyccie.com/lin...pachebasic.htm

They state to do it this way too. I just want to be sure they cant just use php to see/access others websites?
 
Old 02-11-2005, 03:34 AM   #6
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
We surly must have some webhosts here? How are you doing it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Debian webserver as secure as possible Fuel Debian 2 07-20-2005 05:23 AM
Setting up secure apache2 webserver https access on suse linux 9.2 svanati SUSE / openSUSE 4 12-21-2004 09:07 PM
Correct DNS setup? sti2envy Linux - Networking 2 10-06-2004 06:45 AM
What is the correct Samba permission to my webserver /www directory? how to piratebiter Linux - General 1 09-21-2003 07:12 PM
Trying to setup a secure webserver pyrombca Linux - Software 0 09-02-2003 06:04 PM

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

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