LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-22-2002, 02:19 AM   #1
Station51
LQ Newbie
 
Registered: Nov 2002
Posts: 2

Rep: Reputation: 0
Apache Virtual Hosting and FTP


Hello,

I'm a small web hosting provider and I'm "ok"with Linux but not an expert. The hosting I'm doing is basically a side project. Well I've got a small problem that I don't know exactly how to fix.

I have several domains hosted on my machine and I'm running Apache Named Based Virtual Hosting. I've created a documentroot for each domain and set the admin for thas web site's domain to that directory. I then allow people to FTP in with their username and modify their web site.

The problem I'm having is that users are able to back up a directory in FTP and access other users directories and even download files but every attempt I've made of changing permissions has just made Apache give permission denied errors when you try to access one of the web sites. Apache runs as www-data.www-data on my machine, and I've created each user a "username.users"(users being the group)...I've heard this is bad but I've already done it. I can go and change that if its better, but I'm not certain. I was told that I should create them as "username.username" and that would prevent other users from being able to access other users home directories because they would all not belong to the same group anymore. However, if I do this, will this keep www-data.www-data from being able to access them as well? How can I Do this? I'm really lost.

Oh, and the other problem I've been having is that users will log in to their web site directory and make a new directory, and it doesn't have the correct permissions for Apache to access it. I have to modify its permissions to allow everyone access to read it in order for it work. This is a serious issue with me as I'm picking up more and more users and domains. I'm terrible with chmod. I won't even pretend to understand it. I've been using webmin to alter permissions on files because I just don't even want to try to comprehend chmod's complex looking set of instructions in the man page.

Could someone please help and post in EXTREME detail and in "newbie" terms. Once I understand, i'll be alright with this.

On a side note, I love Linux. I've learned a lot doing this project including working on a DNS server, the structures of zone files, setting up smtp and POP3, and my latest endevor was setting up an IRC Server with services support. I don't use webmin for everything, but I do use it for a lot of stuff. I've recently switched from Slackware to Debian, and I'm still adjusting.

Anyway, enough rambling. Thanks for any help anyone can give. It'll be much appreciated.

Bill Sargent
Station51
webmaster51@station51.net
(no i dont do web design, and no i didn't design my page, and yes its a front page template! )
 
Old 11-22-2002, 04:38 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
There are ftp servers which use virtual server names like Apache does.
You call a virtual name eg ftp.there.wherever and you are document rooted to whichever directory you choose.
Hassles may come if you are offering cgi scripting, coz you don't want those directories in the Apache html document tree.
I have made a document root for both called www.server.name and there are two directories inside, cgi & html.
Apache doc roots on html and the ftp on www.server.name

I am using ProFTP and the webmin module

Last edited by peter_robb; 11-22-2002 at 04:41 PM.
 
Old 11-23-2002, 02:05 PM   #3
Station51
LQ Newbie
 
Registered: Nov 2002
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by peter_robb
There are ftp servers which use virtual server names like Apache does.
You call a virtual name eg ftp.there.wherever and you are document rooted to whichever directory you choose.
Hassles may come if you are offering cgi scripting, coz you don't want those directories in the Apache html document tree.
I have made a document root for both called www.server.name and there are two directories inside, cgi & html.
Apache doc roots on html and the ftp on www.server.name

I am using ProFTP and the webmin module
I'm not certain I follow the part about CGI. The way I have it now is as follows...

/websites/domain.com/
/websites/domain.com/website
/websites/domain.com/website/cgi-bin

They are document rooted to website. But the users home directory is actually /websites/domain.com
This way they have access to any other stuff they want. Similar to the ~username deal with apache for www_home.
 
Old 11-25-2002, 06:23 PM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
Placing the cgi directory under the document root opens you up to browsing that directory and reading/downloading the cgi scripts. These may contain passwords, root access code etc...
You can of course put .htaccess files in that directory, but if they are so very secure, there wouldn't be any other security measures offered, and there are heaps to chose from...

So long as apache can find the cgi files for each domain name without anyone else finding them...

/websites/domain.com/ (rooted directory for ftp virtual server)
/websites/domain.com/cgi-bin
/websites/domain.com/website (document root for apache virtual server)
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache virtual hosting msound Linux - Networking 3 09-14-2005 06:09 PM
Apache 2.x Virtual Hosting vbfischer Linux - Software 3 04-21-2005 05:17 PM
Apache and Virtual Hosting gcobb Fedora 4 10-29-2004 12:10 AM
Help with Apache virtual hosting fin Linux - Newbie 1 04-30-2002 10:50 AM
Apache Virtual Hosting kmac Linux - General 2 04-12-2001 10:23 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration