[Zz] How to Control ftp users to switch to the upper-level directory of the FTP home directory

Source: Internet
Author: User
Mkdir/var/FTP // (create an FTP directory) chown FTP/var/FTP // (make the user FTP the owner of/var/FTP, and anonymous access will be disabled later, therefore, this step is required) chmod o-x/var/FTP/* (revoking the user's FTP permission to execute all files under/var/FTP/, which makes it safer. */Passwd FTP // (set the user's FTP password) Vim/etc/password // (edit the password file and change the FTP home directory to/var/FTP) vim/etc/vsftpd. conf // (compile the main configuration file of the F series vsftpd, anonymous_enable = No, Listen = yes) Service vsftpd start // (start vsftpd) chkconfig vsftpd on // (set vsftpd to be started when the system starts)

  


Controls whether users are allowed to switch to the parent directory
By default, after logging on to FTP, a local user can use the CD command to switch to another directory, which brings security risks to the system.
You can use the following three configuration files to control user directory switching. Chroot_list_enable = Yes/No (NO) sets whether to enable the user list file specified by the chroot_list_file configuration item. The default value is no.
Chroot_list_file =/etc/vsftpd. chroot_list is used to specify the user list file, which is used to control which users can switch to the parent directory of the user's home directory.
Chroot_local_user = Yes/No (NO) is used to specify whether users in the user list file are allowed to switch to the parent directory. The default value is no.
The following effects can be achieved through combination:
① When chroot_list_enable = Yes, chroot_local_user = Yes, in/etc/vsftpd. users listed in the chroot_list file can switch to other directories. Users not listed in the file cannot switch to other directories.
② When chroot_list_enable = Yes, chroot_local_user = No, in/etc/vsftpd. users listed in the chroot_list file cannot switch to other directories. Users not listed in the file can switch to other directories.
③ When chroot_list_enable = No, chroot_local_user = Yes, all users cannot switch to other directories.
④ When chroot_list_enable = No and chroot_local_user = No, all users can switch to other directories.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.