Link to home
Start Free TrialLog in
Avatar of regenbauma
regenbauma

asked on

vsftpd configuration to make external ntfs drive available via ftp

I have installed vsftpd.. my config file is as follows..
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ls_recurse_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
userlist_enable=YES
userlist_file=/etc/chrootUsers
userlist_deny=NO
pam_service_name=vsftpd

I have created a user.... i can ssh into the box as that user..but if I
#ftp localhost
and pass the username and password.. i get a login failure message..what do i need to do to get this username and passd to work ?


my bigger question is that I have an external ntfs volume mounted as /var/external... i want to have ftp users see that external volume and upload files from it ... how do i setup to have local users view this external drive via ftp..

I have tried mounting as
/var/ftp   ..no help


Avatar of regenbauma
regenbauma

ASKER

some more info .... the goal here is to mount the external drive so that it can be seen by any type of ftp user.... chrooted or otherwise ....

to give you max info on the drive

tail -f messages on insert gives

Sep  9 16:46:49 localhost kernel: hub.c: USB new device connect on bus1/2, assigned device number 4
Sep  9 16:46:49 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Sep  9 16:46:49 localhost kernel:   Vendor: Maxtor 6  Model: Y160L0            Rev:  0 0
Sep  9 16:46:49 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Sep  9 16:46:49 localhost kernel: Attached scsi disk sdc at scsi2, channel 0, id 0, lun 0
Sep  9 16:46:49 localhost kernel: SCSI device sdc: 320173056 512-byte hdwr sectors (163929 MB)
Sep  9 16:46:49 localhost kernel:  sdc: sdc1


then i

#mount -t ntfs /dev/sdc1 /mnt/external
#[root@localhost etc]# ls /mnt/external
e00009.mpg
# ls -dl /mnt/external
dr-x------    1 root     root         4096 Apr  9  2002 /mnt/external


regarding vsftpd  .. i have managed to configure login from local users .... so would ideally like to mount this drive so that its contents were aavailable to the local user home directory /home/sealynx

I have tried to mount the volume as /home/sealynx

 mount -t ntfs /dev/sdc1 /home/sealynx
[root@localhost etc]# ls /home/sealynx
e00009.mpg
[root@localhost etc]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 2.0.1)
Name (localhost:root): sealynx
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/sealynx
Login failed.
421 Service not available, remote server has closed connection
ftp>


i also tried bind

[root@localhost etc]# mount -t ntfs /dev/sdc1 /mnt/external
mount --bind /mnt/external /home/sealynx
[root@localhost etc]# ls /home/sealynx
e00009.mpg
[root@localhost etc]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 2.0.1)
Name (localhost:root): sealynx
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/sealynx
Login failed.
421 Service not available, remote server has closed connection


help is appreciated
go to this site

www.linuxjalali.com

make forum registration.    here admin reply you directly in minuts.

www.linuxjalali.com/forum

The great Linux Related Tools Are Also In This Website free downloads.
I have answered thsi question ... it was related to umask on the mount command
You have set up userlist enable = yes so vsftp will be looking for a list of users that are allowed to log in.

Hope that helps
please "close" this question... i have answered it myself ...
the ftp server is fine...
what was required was to ensure that the external drive had a correct umask on mounting
To close post a 0 point question in the CS (customer service/Community support) TA
with Remove in the question title and the question number
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial