Fedora 10下vsftpd的配置

来源:互联网 发布:mac 安装ruby2.2.2 编辑:程序博客网 时间:2024/04/30 06:32

查询系统中是否安装了vsftpd,可以用命令:rpm -qa | grep vsftpd(找到以后我也不知道有啥用,还是要用rpm包重新装)

安装vsftpd的命令:rpm -ivh vsftpd*.rpm

费了一天时间才解决了一个小小的问题,还没有完全搞懂,先把明白的记录一下。(http://linux.chinaunix.net/techdoc/system/2009/02/09/1061530.shtml)

启动vsftpd的命令式:service vsftpd start

关闭防火墙的命令:service iptables stop

关闭selinux的命令,我在网上查了,但是不好使。所以只能使用下面step 3的方法。想要启用vsftpd,上面三步都必须做。

让匿名登录者anonymous可以上传文件,可参考以下步骤:

Step1. 修改 /etc/vsftpd/vsftpd.conf 

anonymous_enable=YES
anon_upload_enable=NO

改为

anonymous_enable=YES                   # <=确定这行为YES
anon_upload_enable=YES                 # 将这行的NO改为YES即可
anon_mkdir_write_enable=YES          # 若加上这行,则匿名登录者可新增目录

Step2. 修改/var/ftp/pub/的目录权限
执行以下命令:
chmod -R 777 /var/ftp/pub/

Step3. 关闭selinux(我就是因为这个没关,花了一天才把东西传到ftp上) 
在/etc/selinux/config 配置文件如下;
/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 - SELinux is fully disabled.
SELINUX=Disabled #这样就把SELINUX服务器关掉了,请重新启动系统;
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

客户端登陆ftp服务器,windows下用dos登陆,或linux命令行登陆,采用ftp ip address的方式。登陆后的操作和查看文件系统的命令相同。

http://www.dianli8.net/

原创粉丝点击