Home > php教程 > PHP开发 > How to enable FTP service under linux

How to enable FTP service under linux

高洛峰
Release: 2016-12-20 09:39:55
Original
1418 people have browsed it

How to enable FTP service under Linux


1. First, the server needs to install ftp software. Check whether the ftp software has been installed:
#which vsftpd
If you see a vsftpd directory, it means that the server has installed ftp software

2 . Check the ftp server status
#service vsftpd status

3. Start the ftp server
#service vsftpd start

4. Restart the ftp server
#service vsftpd restart

5. Check whether the service is started
#netstat -an | grep 21
tcp 0 0 0.0.0.0:21 0.0.0.0:* tcp LISTEN
If you see the above information, it proves that the ftp service has been started.

6. If you need to enable the root user's ftp permissions, you need to modify the following two files
#vi /etc/vsftpd.ftpusers and comment out root
#vi /etc/vsftpd.user_list also comment out root
Then restart ftp Serve.

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 (19 2.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
and it’s OK!

This is the SELinux setting command. Before you are familiar with SELnux, you can also turn off SELinux.

8. Permanently enabled, that is, the ftp service is automatically turned on after the os is restarted
Method one:
cd /etc/xinetd.d, edit the configuration file gssftp of the ftp service:
vi /etc/xinetd.d/gssftp, change Modify two items:

(a) server_args = -l –a Remove -a and change to server_args = -l
(b) disable=yes to disable=no
(c) Save and exit.

Method 2:
(a) system-config-services, enter the System services of the graphical interface to see if there is a vsftpd item, if not go to 2., save and exit

(b) Use the third disk of redhat to install this Services (Start--Delete/Add Programs), about 200K

  (c) #setup
  You can see the vsftpd item at this time, select this services item at this time, save and exit.



More For related articles on how to enable FTP service under Linux, please pay attention to 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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template