Introduction of FTP service method under linux

  • 2020-06-19 12:33:57
  • OfStack

1. First, the server needs to install ftp software. Check whether the ftp software has been installed:


  #which vsftpd

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

If you don't have ftp installed, here are the download locations and tutorials to follow:

Wing FTP Server FTP Server side Installation tutorial

2. Check ftp server status


  #service vsftpd status

3. Start the ftp server


  #service vsftpd start

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:21         0.0.0.0:*          LISTEN 

If you see the above information, the ftp service is enabled.

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


 #vi /etc/vsftpd.ftpusers Comment out the root
 #vi /etc/vsftpd.user_list Comment it out root

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.

Solutions:


  setsebool ftpd_disable_trans 1
  service vsftpd restart

OK!

This is the SELinux Settings command. Turn off SELinux before you are familiar with SELinux.

8. Permanently open, that is, ftp service will be automatically opened after the os reboot

Method 1:

cd /etc/ ES85en.d, edit ftp service profile gssftp Settings:
vi etc/xinetd d/gssftp, will modify the content of the two:
(a) server_args = -l?? a delete -ES101en change to server_args = -l
disable=yes = disable=no
(c) save exit.

Method 2:

(a) ES120en-ES121en-ES122en. Enter System services in the graphical interface to see if there are vsftpd items. If not, save and exit
(b) Install this service with redhat disk 3 (start - delete/add program), around 200K
# setup (c)

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

conclusion

That is the end of this article on how to enable FTP services under linux, and I hope it will be helpful to you. Welcome to see: Linux interprocess communication method of socket using examples, Linux interprocess communication methods and advantages and disadvantages, Linux in the firewall open 80 port method example, any question can be left at any time, this site will reply to you in time.


Related articles: