Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a ftp server with vsftpd. and if I do command ls always hang. Previously run well, some of the time when I log back in when this happens like this.

user@serverubuntu:~$ ftp localhost
Connected to localhost.
220 SERVER FTP
Name (localhost:user): usernametes
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.

And hang.

Below my config vsftpd.conf in /etc/

listen=YES
anonymous_enable=NO
anon_world_readable_only=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
nopriv_user=www-data
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/vsftpd.pem
guest_enable=YES
guest_username=www-data
local_root=/var/www/vhosts/$USER/httpdocs/
user_sub_token=$USER
virtual_use_local_privs=YES
user_config_dir=/etc/vsftpd_user_conf
local_max_rate=2000000 # bytes per sec, 2Mbytes per sec
max_clients=50 # to avoid DOS attack, if you have a huge server, increase this..
ftpd_banner=SERVER FTP

Server using ubuntu server 10.4 lucid. And vsftpd using virtual user which users I get from mysql.

Thanks.

share|improve this question
    
i recomend u check log of vsftpd. –  arheops Feb 4 '13 at 5:32
add comment

1 Answer

In corporate scenarios, this problem is most commonly due to excessively high file counts in the FTP home directory of the user you're logging in as. (example: thousands of images)

Execute ls -1 | wc -l in that user's FTP home and verify whether or not this is the case. If it is, there's not a whole lot that can be done other than choosing a better way of organizing the files (not always an option), or avoiding listing the directory over FTP.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.