Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to open FTP service under linux

Shulou Source: shulou.com Published: 2022-06-01 03:05:01 09月16日 Update

How to open FTP service under linux, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

How to open FTP service under linux

1. First of all, the server should install the ftp software to see if the ftp software has been installed:

# which vsftpd

If you see a directory with vsftpd, the server has installed ftp software.

two。 View ftp server status

# service vsftpd status

3. Start the ftp server

# service vsftpd start

4. Restart the ftp server

# service vsftpd restart

5. Check to see if the service is started

# netstat-an | grep 21

Tcp 0 0 0.0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0

If you see the above information, it proves that the ftp service has been enabled.

6. If you need to enable ftp permissions for root users, you need to modify the following two files

# comment out root in vi / etc/vsftpd.ftpusers

# root is also commented out in vi / etc/vsftpd.user_list

Then restart the ftp service.

7. Vsftpd 500 OOPS: cannot change directory

Login error:

C:\ > ftp 192.168.0.101

Connected to 192.168.0.101.

220 (vsFTPd 2.0.5)

User (192.168.0.101: (none)): frank

331 Please specify the password.

Password:

500 OOPS: cannot change directory:/home/frank

Login failed.

Ftp > ls

500 OOPS: child died

Connection closed by remote host.

Solution:

Setsebool ftpd_disable_trans 1

Service vsftpd restart

Just OK!

This is the setting command for SELinux. It is OK to turn off SELinux before you are not familiar with SELnux.

8. Enable it permanently, that is, automatically start the ftp service after os restart

Method 1:

Cd / etc/xinetd.d, edit the settings for the ftp service profile gssftp:

Vi / etc/xinetd.d/gssftp, two things will be modified:

(a) server_args =-l-a remove-an and replace it with server_args =-l

(B) change disable=yes to disable=no

(C) Save exit.

Method 2:

(a) system-config-services, enter the System services in the graphical interface to check whether there is a vsftpd entry. If you do not go to 2., save and exit.

(B) install the service on the third disk of redhat (start-remove / add program), around 200K

(C) # setup

You can see the vsftpd item at this time, select the services item at this time, save and exit.

After reading the above, have you mastered how to open the FTP service under linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Services methods servers content software files more comments problems helpless for this two information reasons commands graphics this skills permissions status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Information Shulou Tech Info Linux Microsoft