Home  >  Article  >  System Tutorial  >  How to build an FTP server under Linux

How to build an FTP server under Linux

WBOY
WBOYforward
2024-04-11 11:25:211142browse

How to build an FTP server under Linux

Generally, in various Linux distributions, the default ftp software is vsftp. From the recognition of vsftp by various Linux distributions, it can be seen that vsftp should be a good ftp software.

1. Check and install vsftpd software

Use the following command

#
rpm -qa |grep vsftpd

You can detect whether the vsftpd software is installed. If it is not installed, use the YUM command to install it

yum install vsftpd -y
2. Start the service

Using vsftpd software mainly includes the following commands:

启动ftp命令
#service vsftpd start
停止ftp命令
#service vsftpd stop
重启ftp命
#service vsftpd restart
3. Configuration of vsftpd

There are three main ftp configuration files, located in the /etc/vsftpd/ directory, which are:

ftpusers 该文件用来指定那些用户不能访问ftp服务器。
user_list 该文件用来指示的默认账户在默认情况下也不能访问ftp
vsftpd.conf vsftpd的主配置文件
4. Log in as anonymous user

We remove the following in the configuration file vsftpd.conf

anon_upload_enable=YES
anon_mkdir_write_enable=YES

<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;">两项前面的#号,就可以完成匿名用户的配置,此时匿名用户既可以登录上传、下载文件。记得修改配置文件后需要重启服务。</span>
5. Creation and use of non-anonymous accounts

The vsftpd service and the system user are related to each other. For example, we create a file named testwww

#useradd testwww
#passwd testwww
6. Login method
浏览器打开 :
浏览器上输入
ftp://vsftp所在机器ip/
文件打开 :
文件夹输入
ftp://vsftp所在机器ip/ ;
 右键可以选择登录

The above is the detailed content of How to build an FTP server under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete