LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories (https://www.linuxquestions.org/questions/linux-software-2/vsftpd-web-uploads-vsftpd-virtual-users-apache-virtual-hosts-home-directories-49459/)

jerryasher 03-12-2003 11:49 AM

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

Crashed_Again 03-12-2003 12:01 PM

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.

jerryasher 03-12-2003 12:13 PM

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.

david_ross 03-12-2003 04:14 PM

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

markus1982 03-12-2003 04:27 PM

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!

timmeke 03-27-2006 02:37 AM

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.

chickenleg 05-11-2006 09:10 AM

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 :)

just_for_fun 02-18-2007 06:29 AM

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 06:40 AM.