PDA

View Full Version : vsftp - How to add additional directories.


Megatron
21st June 2004, 04:50 AM
Hi,

Iíve recently installed FC2 and have gotten everything to work nicely except for VSFTP.

I want to have VSFTP setup so that when users login with the home account (local account) they can also upload to /var/ftp/pub in addition to their normal home directories.

Iíd also like to be able to have VSFTP setup so that I can ftp files into /var/www/html for my website.

I had a look vsftp.conf file and I canít find an option to do this. I am not even sure if this is possible with VSFTP. Does anyone know if this can be done, and if so how?

I have heard that there other ftp servers out there, but Iíd like to use vsftp as I understand that it is the most secure.

If can get that this working then I would be one happy linux convert. Thanks for any help you can give me with this.

Thank you in advance.

Cheers,

Megatron

jeru
21st June 2004, 01:19 PM
I've always just used symlinks when I need to do that. (but for the most part I don't use ftp anymore)

ln -s /var/www/html /home/user/html

decals74
21st June 2004, 10:29 PM
vsftpd doesnt support symlinks to dirs outside the initial chroot'ed jail that users start off in after logging in. what i've used to get around this limitation is

`mount --bind /usr/local/share/pub /var/ftproot/pub`

the --bind option lets you remount any part of the filesystem anywhere u want. here's some info from the mount manpage:

Since Linux 2.4.0 it is possible to remount part of the file hierarchy
somewhere else. The call is
mount --bind olddir newdir
After this call the same contents is accessible in two places.

This call attaches only (part of) a single filesystem, not possible
submounts. The entire file hierarchy including submounts is attached a
second place using
mount --rbind olddir newdir

Note the filesystem mount options will remain the same as those on the
original mount point, and cannot be changed by passing the -o option
along with --bind/--rbind.

Megatron
22nd June 2004, 06:50 AM
That's great guys thanks for the tips! Works like a charm!

Cheers,

Dieter

coredump
2nd October 2004, 05:35 PM
that sounds cool for a single user environment, but how about to setup vsftp to log into my domains? i have 9 domains i host and dont really need to allow one to access another... any hints in this arena? i used namebased virtual hosts in the apache server, and on proftpd i used <domain.com> to log into ftp and it would set dir to be the domains /var/www/html/<domain> since it was the user home dir.

help? thanx

ps: i like the vsftp using chroot since my proftpd got hacked and this is why i am using fedora with the SElinux active

Neumunster - Paithan Photos on Instagram - Mul Photos on Instagram