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

2 comments on “vsftp change root directory

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s