In Linux, ftp cannot view the file list.

Source: Internet
Author: User

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:

Related Article

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.