rebuild
By:
rebuild

why can't install vsftp on DigitalOcean?

October 28, 2014 1.4k views

I have installed vsftp service this way on my serverip:

   #apt-get install vsftpd
  #useradd -d /home/ftp virtual
   #chown virtual /home/ftp
  #chmod 700 /home/ftp
  #chown virtual /var/www
   #chmod 775 /var/www  
   #mkdir /etc/vsftpd/user_conf

#vim  /etc/vsftpd/user_conf/web 
    local_root=/var/www   
    anon_world_readable_only=NO
    anon_umask=022 
    write_enable=YES  
    anon_mkdir_write_enable=YES  
    anon_upload_enable=YES 
    anon_other_write_enable=YES 

#vim  /etc/vsftpd/user_conf/download
local_root=/home/ftp 
anon_world_readable_only=NO

#vim  /etc/vsftpd/user_conf/admin

    local_root=/home/ftp
    anon_world_readable_only=NO 
    write_enable=YES  
    anon_mkdir_write_enable=YES  
    anon_upload_enable=YES 
    anon_other_write_enable=YES 

nano /etc/vsftpd.conf 
   anonymous_enable=NO 
   local_enable=YES 
   guest_enable=YES 
   guest_username=virtual 
   pam_service_name=ftp.vu 
   user_config_dir=/etc/vsftpd/user_conf 

nano  logins.txt  

   web      account_name
   ******      keyword

   download    account_name
   *******      keyword

   admin       account_name
   *******     keyword
   #apt-get install libdb3-util
   #db3_load –T –t hash –f /tmp/logins.txt /etc/vsftpd/vsftpd_login.db
   auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
   account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login 

/etc/init.d/vsftpd restart

when everyting is done, i can't connect my vsftp with command
tfp
open my serverip.

what is the matter?

2 Answers

Have you opened up your firewall?

ufw allow from any to any port 21

root@test:~# iptables -A INPUT -p tcp --dport 21 -j ACCEPT
root@test:~# iptables -A OUTPUT -p tcp --sport 21 -j ACCEPT
root@test:~# iptables -A INPUT -p tcp --dport 20 -j ACCEPT
root@test:~# iptables -A OUTPUT -p tcp --sport 20 -j ACCEPT
There is no reaction with the command :
ftp
open myserverip
ls :Not connected.

Have another answer? Share your knowledge.