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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-12-2003, 11:49 AM
|
#1
|
LQ Newbie
Registered: Mar 2003
Distribution: Red Hat
Posts: 2
Rep:
|
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
|
|
|
03-12-2003, 12:01 PM
|
#2
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
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.
|
|
|
03-12-2003, 12:13 PM
|
#3
|
LQ Newbie
Registered: Mar 2003
Distribution: Red Hat
Posts: 2
Original Poster
Rep:
|
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.
|
|
|
03-12-2003, 04:14 PM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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
|
|
|
03-12-2003, 04:27 PM
|
#5
|
Senior Member
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467
Rep:
|
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!
|
|
|
03-27-2006, 02:37 AM
|
#6
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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.
|
|
|
05-11-2006, 09:10 AM
|
#7
|
LQ Newbie
Registered: May 2006
Posts: 3
Rep:
|
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 
|
|
|
02-18-2007, 06:29 AM
|
#8
|
LQ Newbie
Registered: Feb 2007
Location: vienna
Distribution: Debian etch,Debian sarge
Posts: 17
Rep:
|
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! 
|
|
|
All times are GMT -5. The time now is 03:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|