LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2004, 07:58 PM   #1
reizero
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Apache, FTP and Users


I just recently installed Slackware 9.0 and succesfully set up Apache, PHP, and MySQL. The default page is showing up and everything is running smoothly. What I want to do now is be able to add users and give them webspace. Detailed things concerning this are:

1) Giving them a subfolder (ie link.com/newbie)

2) Ability to use FTP, but only letting them see their OWN folder, not any others.

3) (Extra) Subdomain. (ie newbie.link.com)

lol. Thats about it, I've road so much information on this, but can't seem to find the answer. Any help is greatly appreciated by this apache newbie. :-D

Thanks in advance,

-zero
 
Old 03-16-2004, 08:55 PM   #2
tuxguy
Member
 
Registered: Mar 2004
Location: North Bay, Ontario - CANADA
Distribution: Debian
Posts: 77

Rep: Reputation: 16
Re: Apache, FTP and Users

Quote:
Originally posted by reizero
[B]I just recently installed Slackware 9.0 and succesfully set up Apache, PHP, and MySQL. The default page is showing up and everything is running smoothly. What I want to do now is be able to add users and give them webspace. Detailed things concerning this are:

1) Giving them a subfolder (ie link.com/newbie)
add public_html to the /etc/skel dir.. chmod it to 755 this places a public_html dir in every new user's dir etc. /home/newbie/public_html
apache will send all link.com/~newbie requests to newbie/public_html dir.

Quote:
2) Ability to use FTP, but only letting them see their OWN folder, not any others.
I like vsftpd install this and modify the vsftpd.conf file (in /etc dir)
anonymous_enable=NO
local_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

then create the /etc/vsftpd.chroot_list file and put the usernames you DO NOT want to be chroot'd in there (your own etc....) then restart the daemon.

Quote:

3) (Extra) Subdomain. (ie newbie.link.com)
I am not too sure if there is an easier way.. but I think using Virtualhost's in apache would suffice...

Jesse

Last edited by tuxguy; 03-16-2004 at 08:57 PM.
 
Old 03-16-2004, 08:58 PM   #3
PolyPerception
LQ Newbie
 
Registered: Feb 2004
Location: Fort Worth, Texas
Distribution: Slackware-9.1
Posts: 29

Rep: Reputation: 15
In your root dir you can add folders for users. The default directory for Apache is /usr/local/apache/htdocs or at least when I install from source. You can change the default directory in the config /usr/local/apache/conf/httpd.conf . Also in the config you can specify subdomains, its called "VirtualHost" in the config file, if you need help I could help with that also. Now about the FTP, you can use PureFTPd which is a really nice FTP server, which supports virtual users. Virtual users would allow for "only letting them see their OWN folder" and that is called chroot -ing. PureFTPd is at http://www.pureftpd.org
 
Old 03-16-2004, 10:54 PM   #4
reizero
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I added the folder to /etc/skel and I also downloaded and installed PureFTPd.

Apparently my other FTP Server Program (ProFTPd) is using the address, so I can't use PureFTPd. Is there anyway I can disable ProFTPd? or is ProFTPd better?

I think I will need some help with Apache's VirtualHost sytem. I'm sorry for being a complete newb lol. A friend of mine said "We were all newbs at least once, unless you were born into the class." lol.

Thanks for your help so far. =)

-zero
 
Old 03-17-2004, 09:48 AM   #5
tuxguy
Member
 
Registered: Mar 2004
Location: North Bay, Ontario - CANADA
Distribution: Debian
Posts: 77

Rep: Reputation: 16
NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#
<VirtualHost *>
ServerAdmin user1@email.com
DocumentRoot /home/newbie/public_html
ServerName newbie.link.com
ErrorLog logs/newbie.link.com-error.log
CustomLog logs/newbie.link.com-access.log common
</VirtualHost>

<VirtualHost *>
ServerAdmin user2@email.com
DocumentRoot /home/newbie2/public_html
ServerName newbie2.link.com
ErrorLog logs/newbie2.link.com-error.log
CustomLog logs/newbie2.link.com-access.log common
</VirtualHost>


etc etc etc

for proftpd find the proftpd.conf file and add DefaultRoot ~ in the file and then restart the daemon...

this will chroot all users to their home dir's....
if you want to create a "special group" that will NOT be chroot (your self).. mkgroup then add your self to that group... then add this line instead:
DefaultRoot ~ !ftp-special (were ftp-special is your group)

good luck
 
Old 03-17-2004, 12:21 PM   #6
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
switch to VSFTPD... jailing users works great... very secure, very fast...
 
Old 03-18-2004, 06:53 PM   #7
PolyPerception
LQ Newbie
 
Registered: Feb 2004
Location: Fort Worth, Texas
Distribution: Slackware-9.1
Posts: 29

Rep: Reputation: 15
Quote:
Originally posted by reizero
Apparently my other FTP Server Program (ProFTPd) is using the address, so I can't use PureFTPd. Is there anyway I can disable ProFTPd? or is ProFTPd better?
Yes, you could stop proftpd service.

Quote:
I'm sorry for being a complete newb lol. A friend of mine said "We were all newbs at least once, unless you were born into the class."
-zero [/B]
Its just some perfer to stay there longer than others.
 
  


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
How to setup FTP users only users on LInux Fedora Soujiro Linux - Newbie 8 09-13-2010 07:34 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM
ftp users peteABK Linux - Software 0 05-22-2003 12:33 PM
Wu-FTP users??? jay3351 Linux - Networking 1 02-27-2003 12:39 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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