Solved

vsftpd configuration to make external ntfs drive available via ftp

Posted on 2004-09-08
8
1,999 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
Comment Utility
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
Comment Utility
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
Comment Utility
I have answered thsi question ... it was related to umask on the mount command
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 5

Expert Comment

by:paranoidcookie
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Closed, 50 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

728 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

10 Experts available now in Live!

Get 1:1 Help Now