Home > Operation and Maintenance > Linux Operation and Maintenance > What to do if ftp cannot be accessed in Linux

What to do if ftp cannot be accessed in Linux

WBOY
Release: 2022-06-08 18:03:26
Original
6810 people have browsed it

Two solutions: 1. Use getenforce to check the status of selinux and set the status to a relaxed state. 2. Use "head /var/log/messages" to view the log prompts, run the second line of the operation result in the "/etc/vsftpd/" directory, and then restart the vsftpd service.

What to do if ftp cannot be accessed in Linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What should I do if ftp cannot be accessed in Linux?

I have heard many friends report that FTP cannot be accessed before. I have also encountered this problem recently. Today I suddenly found that ftp access has been unable to access. Go and check that the username and password are correct. Check that port 21 of the server's FTP server is in the listening state, but suddenly FTP cannot be accessed. HH?

First read the log: head /var/log/messages

FTP cannot enter solution one:

According to the log prompt: It is related to selinux security. You can check the status of selinux at this time:

What to do if ftp cannot be accessed in Linux

It can be seen that selinux is in a mandatory state, and we set it to a relaxed state:

[root@linux vsftpd]#setenforce 0
Copy after login

At this point the user can log in normally! problem solved!

FTP cannot enter solution two:

Our selinux is still set to enforce state, run according to the log prompt:

sealert -l 6459724e-821f-4334-8b5c-1ac0d96ea5cb
Copy after login

Run There are 2 lines after the result:

What to do if ftp cannot be accessed in Linux

First run the first line:

Then switch to the /etc/vsftpd/ directory and run the second line:

Finally restart the vsftpd service!

[root@master ~]# systemctl restart vsftpd
Copy after login

Test access to ftp login is normal!

Recommended learning: Linux video tutorial

The above is the detailed content of What to do if ftp cannot be accessed in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template