In Linux, ftp cannot view the file list.
After ftp is configured on the Linux server today, logon is normal. After ftp is used to log on, all directories can be accessed by manually writing paths, but no data is visible to folders and file lists.
Later, I analyzed the cause and found that the result was related to selinux. So after selinux is disabled, I tried to check the ftp folder and file list normally.
The following two figures show before and after solution:
1. Before resolving the problem, you can enter the correct path to read the access, but the list is not displayed.
2. After the solution is completed, you can view the list data visually.
There are three methods to set selinux in Linux.
1. In the graphic interface:
Desktop --> Management --> Security Level and firewall, set to disable.
2. In command mode:
Modify the file:/etc/selinux/config and restart the system. Specific Modification
3. Run the setup command to go to "firewall configuration". In The selinux column, select "Disable".
4. Run the command: setenforce 0 (no need to restart ).
Disable selinux protection for the specified service (using ftp as an example ):
1. Run the getsebool ftpd_disable_trans command to check the current status if it is not on
2. Enter the command: setsebool ftpd_disable_trans 1
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
As for the role of selinux, I will not elaborate on it here. You can just take a look At Baidu.
Simple and practical Ubuntu FTP setup
Set up FTP server and Apache server on Ubuntu
Install the LAMP \ vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Simple case of anonymous uploading of SeLinux and vsftpd on the RHEL6 Platform
Install vsftpd source code in Linux
Case study of vsftpd Security Configuration
This article permanently updates the link address: