如何在linux创建ftp服务器

xiaoxiao2021-02-28  84

1.安装ftp

yum install ftp

2.安装vsftp

yum install vsftp

或者

rpm -ivh vsftpd-2.2.2-12.el6_5.1.x86_64.rpm

3. 需要关闭selinux

vi/etc/selinux/config

# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted

4.允许匿名登录和上传文件

vi /etc/vsftpd/vsftpd.conf

local_enable=YES write_enable=YES anon_upload_enable+YES anon_mkdir_write_enable=YES

5.对ftp的root文件夹权限设置

chmod 777 -R /var/ftp/pub

6.重启

reboot

7.启动vsftpd

 vsftpd /etc/vsftpd/vsftpd.conf &

转载请注明原文地址: https://www.6miu.com/read-77179.html

最新回复(0)