Under Default configuration:
The root directory after the anonymous user logs on to the VSFTPD service is/var/ftp/; The root directory after the system user logs on to the VSFTPD service is the home directory of the system user.
To modify the root directory after logging in to the VSFTPD service, simply modify the/etc/vsftpd/vsftpd.conf file.
Suppose you want to adjust the login root of the VSFTPD service to/data1/project, you can add the following three lines:
Local_root=/data1/project
Chroot_local_user=yes
Anon_root=/var/www/html
Tips:local_root for system users; anon_root for anonymous users.
Any user FTP log on to this server will be chroot to the/data1/project directory.
Tips: Note The permissions to modify the directory, otherwise you will be prompted for a permission deny error.
After you edit the vsftpd.conf file, save to exit the restart service.
Service VSFTPD Restart
After the FTP client logs on to the VSFTPD service, its root directory is/data1/project.
tips:ftp Web url:ftp://user:[email protected] such as:ftp://zyd:[email protected]
VSFTPD Modifying the default directory