Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6523613
  • 博文数量: 1005
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13071
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1005)

文章存档

2020年(2)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: LINUX

2011-11-23 16:33:28

1.开机默认VSFTPD服务自动启动:
方法一:
[root@localhost etc]# chkconfig --list|grep vsftpd ( 查看情况)
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@localhost etc]# chkconfig vsftpd on (执行ON设置)
方法二:
修改 /etc/rc.local , 把行/usr/local/sbin/vsftpd & 插入文件中,以实现开机自动启动。
方法三:
修改/etc/rc.local,加入/etc/rc.d/init.d/vsftpd start
 
方法四:
启动和关闭Vsftpd
1.用命令行方式启动和停止
在Red Hat Enterprise Linux 5中,通过命令行方式启动和停止Vsftpd服务可使用如下命令。
启动Vsftpd服务
其命令为:
# service vsftpd start
为 vsftpd 启动 vsftpd: [确定]
停止Vsftpd服务
停止Vsftpd服务的命令为:
# service vsftpd stop
关闭 vsftpd: [确定]
重新启动Vsftpd服务
重新启动Vsftpd服务的命令为:
# service vsftpd restart
关闭 vsftpd: [确定]
为 vsftpd 启动 vsftpd: [确定]
检查Vsftpd服务状态
可以采用以下命令检查Vsftpd服务的运行状态:
service vsftpd status
vsftpd (pid 3571) 正在运行...
也可以使用以下命令,实现相同的结果:
# /etc/init.d/vsftpd start
# /etc/init.d/vsftpd stop
# /etc/init.d/vsftpd restart
方法五:
Applications/System Settings/Server Settings/Services
找到vsftpd服务,选择vsftpd服务.
 
2.配置FTP默认目录
步骤1:
vi /etc/vsftpd/vsftpd.conf
在文件最后加入如下三行(注意每行后不能有空格,之前加入的时候不小心加入了空格导致服务不能启动):
local_root=/ftp
chroot_local_user=YES
anon_root=/ftp
步骤2:重启动vsftpd服务
service vsftpd restart
 
配置过程遇到的问题:
500 OOPS: cannot change directory:/rootConnection closed by remote host
解决方案1:
system->administration->SELinux Management
Boolen-FTP-Allow ftp to read/write files in user home directories(enable)
解决方案2:
setsebool ftpd_disable_trans 1
service vsftpd restart
 
-- The End --
阅读(3691) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

linux_kaige2011-11-24 20:41:59

very easy,chkconfig --level 345 vsftpd on
userlist_enable=YES
tcp_wrappers=YES
userlist_deny=NO
userlist_file=/etc/vsftpd/vsftpd.userlist
........................