ftp – sync data from remote ftp server

 

To sync data from remote ftp server install ncftp with following command:

apt-get install ncftp

Now use following command to sync data from remote ftp server:

ncftpget -R -T -v -u userName -p 'password' ftp_hostname "directoryPathInFtpServer" "directoryPathInLocalMachine"

Ubuntu vsftpd 550 permission denied upload

While configuring vsftp I am stuck with the error “550 Permission denied.”

After debugging for quite a bit time and playing with vsftpd.conf editing following 3 configurations are worked for me:

anonymous_enable=NO
local_enable=YES
write_enable=YES

In final final vsftpd.conf file following configurations available:

listen=YES
anonymous_enable=NO
anon_root=/home/user
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem

After doing any changes in vsftpd.conf file you need restart vsftpd daemon to change make the effect.

In Ubuntu/Debian operating systems use following command to restart vsftpd:

$ service vsftpd restart

vsftp change root directory

 

You can change the root directory in vsftp as you wish..

If you enable chroot_local_user=YES, it will restrict local users to their home directories.

Some times you may want to change your root form home directory to other directory.

To change the home directory from user home directory to other directory add following lines in your  vsftpd.conf (/etc/vsftpd.conf).

anonymous_enable=YES

anon_root=/home/user/dir (here you can set the directory as you wish)

Following is my vsftpd.conf

listen=YES
anonymous_enable=YES
local_enable=NO
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
anon_root=/home/abc/mydir

-Sany