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.
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
Using vsftpd software mainly includes the following commands:
启动ftp命令 #service vsftpd start 停止ftp命令
#service vsftpd stop 重启ftp命
#service vsftpd restart
There are three main ftp configuration files, located in the /etc/vsftpd/ directory, which are:
ftpusers 该文件用来指定那些用户不能访问ftp服务器。 user_list 该文件用来指示的默认账户在默认情况下也不能访问ftp vsftpd.conf vsftpd的主配置文件
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>
The vsftpd service and the system user are related to each other. For example, we create a file named testwww
#useradd testwww #passwd testwww
浏览器打开 : 浏览器上输入 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!