Solved

vsftpd configuration to make external ntfs drive available via ftp

Posted on 2004-09-08
8
2,033 Views
Last Modified: 2013-12-16
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


0
Comment
Question by:regenbauma
8 Comments
 

Author Comment

by:regenbauma
ID: 12017830
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
0
 

Expert Comment

by:aadilfahad
ID: 12021519
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.
0
 

Author Comment

by:regenbauma
ID: 12021844
I have answered thsi question ... it was related to umask on the mount command
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 5

Expert Comment

by:paranoidcookie
ID: 12026685
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
0
 

Author Comment

by:regenbauma
ID: 12027601
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
0
 
LVL 6

Expert Comment

by:knollbert
ID: 12028801
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
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12058084
Closed, 50 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now