VsftpdIs the most popular FTP server program in the Linux release. I have been using it for a long time, and the results are good. I recommend it to you. This article provides two common vsFTPd functions:
I. How can I restrict users to the home directory?
We need to create a file by ourselves in the/etc directory or in the/etc/vsftpd directory (If your vsftpd configuration files are all in this directory );
# Touch/etc/vsftpd. chroot_list
Beinan and nanbei users are restricted to their home directories, while other FTP users do not.
In the vsftpd. chroot_list file, add beinan and nanbei. Note that each user occupies one row.
Beinan
Nanbei
Modify the/etc/vsftpd. conf file and find the following two lines:
Chroot_list_enable = YES
Chroot_list_file =/etc/vsftpd. chroot_list
If there are no such two rows, you can add them by yourself.
After the configuration, restart the vsFTPD server.
Supplement 1: How to restrict all FTP users in the system to the home directory ?? As prompted by juliaugong, I found the foreign description of vsFTPd, proving that this option is a one-size-fits-all solution. All users can restrict access to the home directory.
You can add the following line by changing the vsftpd. conf file:
Chroot_local_user = YES
After modifying the configuration file, do not forget to restart the vsFTPd server;
2. How can I bind an IP address to vsFTPd?
How can I bind an IP address to vsFTPd? That is to say, how can users access FTP only through an IP address. In fact, this function is very interesting. If you are bound to an intranet IP address, there is no way to access the outside. If the IP address of the external service is bound, the Intranet can only access the FTP through the IP address of the external service.
Add a line in vsftpd. conf. Take my lan as an example. Please refer to the operating environment in the first post, so that the Internet cannot access my FTP, and the Intranet may also access FTP through 192.168.0.2;
Listen_address = 192.168.0.2
Based on the description in the article, we know two more practical vsFTPD server functions, and hope to help you!
- Speed limit and limit link points for common vsFTPd Functions
- Modify default directory for common vsFTPd Functions
- Custom welcome information for common vsFTPd Functions
- Common vsFTPd functions: Setting virtual paths and viewing log information
- Read and Write Permissions for common vsFTPd Functions
- Anonymous upload/download of common vsFTPd Server Functions
- Getting started with vsftpd-installation, configuration, cases and FAQs
- Install vsFTPd in one minute