Vsftp limits ftp users to be in a specific directory

Source: Internet
Author: User

User Configuration Directory:/etc/vsftpd/user. d
Create a configuration file for each user
For example:
#/Etc/vsftpd/user. d/Tom
Edit the Tom file and add the following content:
Local_root =/home/hyq/FTP/Tom
# End

VI/etc/vsftpd. conf
Add the following lines:
Chroot_list_enable = Yes
Chroot_local_user = Yes
Chroot_list_file =/etc/vsftpd/chroot_list
User_config_dir =/etc/vsftpd/user. d

Restart the vsftpd service vsftpd restart.

 

Solution for 500 Oops: cocould not bind listening IPv4 socket in vsftp
Cause: because both inetd and standalone are specified, the port conflict occurs.
Solution:
1. xinet Mode
Remove the vsftpd STARTUP script/usr/local/sbin/vsftp &
Restart the xinetd service and the service xinetd restart
Run the service vsftpd restart command to start vsftpd

2. standalone Mode
This mode is recommended when the server load is heavy.
You can also directly modify the/etc/xinetd. d/vsftpd file and change disable = No to disable = yes!

Starting vsftpd For vsftpd: [failed] appears during service vsftpd start.
Modify/etc/logrotate. d/vsftpd. Log
Comment out missingok

######################################## ################################
Failed to connect to vsftpd server. error message:

500 Oops: cannot change Directory:/home /*******

Solution:

Enter the following command on the terminal:

Setsebool ftpd_disable_trans 1

Service vsftpd restart
This is because Se has disabled FTP. Run the getsebool ftpd_disable_trans command to check whether the current status is on,
Enter the setsebool ftpd_disable_trans 1 command. Of course, you can also add the-p parameter,
So that you do not need to enter this command every time you start the system. setsebool-P ftpd_disable_trans 1

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.