LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-12-2003, 11:49 AM   #1
jerryasher
LQ Newbie
 
Registered: Mar 2003
Distribution: Red Hat
Posts: 2

Rep: Reputation: 0
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories


I would like to offer a group of friends (not technically adept) the ability to host their websites on a server of mine. These would be name-based virtual hosted sites, not just ~user sites.

Having read the vsftpd examples, I would think I would want to make a vsftpd virtual user for each of these friends, and then have that virtual user mapped to a specific directory on the server (/var/www/user).

What I can't figure out from the examples is how to do that mapping. It seems as though all virtual users will share the same directory, which is not what I want. And the alternative is to make regular users, which again, I would prefer not to do.

How do I configure vsftpd to implement many virtual users where each virtual user has a specific and unique home directory?

Thank you,

Jerry Asher
 
Old 03-12-2003, 12:01 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
How about writing a little script that runs as soon as the users log in. Something to the effect of:

if (user=bill)
then
cd /var/www/bill
else if(user=joe)
then
cd /var/www/joe

Of course thats not the exact syntax that you would use but you get the idea.
 
Old 03-12-2003, 12:13 PM   #3
jerryasher
LQ Newbie
 
Registered: Mar 2003
Distribution: Red Hat
Posts: 2

Original Poster
Rep: Reputation: 0
I'm not sure what you're referring to wrt their logging in or when the script would run.

I don't want them to be able to login (to a shell). I want them to connect as virtual users only to vsftpd and have vsftpd "know" where they belong.
 
Old 03-12-2003, 04:14 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try using wu-ftpd.

It defaults to the way you want.

To give yourself full system access:
1) vi /etc/ftpaccess
2) add your username to the "realuser" list


Hope this helps

David
 
Old 03-12-2003, 04:27 PM   #5
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
NEVER EVER use wu-ftpd if you are not FORCED to do so. It has a pretty bad security history. I suggest ProFTPd - or even better vsftpd. vsftpd can authentificate through pam (e. g. pam_mysql) ... ProFTPd can authentificate also against a MySQL-database!
 
Old 03-27-2006, 02:37 AM   #6
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Can't you use a combination of:
-per user configuration (user_config_dir option or something like that)
-anon_root or local_root setting for each user (depending on the option that specifies if virtual users get
either local user privileges or anonymous user privileges)?

Downside may be that failure to change to the given directory is silently ignored.
 
Old 05-11-2006, 09:10 AM   #7
chickenleg
LQ Newbie
 
Registered: May 2006
Posts: 3

Rep: Reputation: 0
Im having a play with vsftp too and have read that you can make it automatically go into the folder you want simply by adding the following to your vsftp config file:

user_sub_token=$USER
local_root=/var/www/$USER

Dont know if it definately works though
 
Old 02-18-2007, 06:29 AM   #8
just_for_fun
LQ Newbie
 
Registered: Feb 2007
Location: vienna
Distribution: Debian etch,Debian sarge
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by chickenleg
Im having a play with vsftp too and have read that you can make it automatically go into the folder you want simply by adding the following to your vsftp config file:

user_sub_token=$USER
local_root=/var/www/$USER

Dont know if it definately works though
Yeah, I had the same problem, and I solved it with these 2 options , thank you!
 
  


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
vsftpd setup with virtual users markus1982 Linux - Networking 21 11-04-2004 06:38 AM
vsftpd and virtual users chrull Linux - Software 0 05-14-2004 05:09 PM
vsftpd and virtual users poweroff Linux - General 0 02-26-2004 07:04 AM
vsftpd and virtual users JeffV Linux - Software 2 11-14-2003 09:47 AM
Installation vsftpd - Virtual Users Yoss Linux - Networking 7 07-11-2003 03:00 AM

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

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