linux ftp设置

1. 先用rpm -qa| grep vsftpd命令检查是否已经安装,如果ftp没有安装,
使用yum  -y  install vsftpd 安装,(ubuntu 下使用apt-get install vsftpd)

2. service vsftpd start
启动要让FTP每次开机自动启动,运行命令:  chkconfig --level 35 vsftpd on

3. 设置ftp权限
vi  /etc/vsftpd/vsftpd.conf
将anonymous_enable=YES 改为 anonymous_enable=NO
ESC返回,输入“:wq”保存并推出

4
useradd   -d /etc/httpd/jcy111  -s /sbin/nologin wbhtest111
passwd   wbhtest111
chmod -R 755  /etc/httpd/jcy111
chown -R  wbhtest111  /etc/httpd/jcy111
/etc/rc.d/init.d/vsftpd restart
ftp://IP
用户名 wbhtest111
密码 wbhtest111
/etc/httpd/jcy111 目录下面

5
然后用帐号wbhtest111密码
测试下就可以登陆ftp了。目录是/etc/httpd/jcy111

useradd   -d /etc/httpd/byltextile  -s /sbin/nologin wbhtest111
passwd   wbhtest111
chmod -R 755  /etc/httpd/byltextile
chown -R  wbhtest111  /etc/httpd/byltextile
/etc/rc.d/init.d/vsftpd restart

userdel -r -f wbhtest111 (此操作一定要谨慎,删除用户的同时会删除掉目录)

 

posted @ 2015-01-23 10:15  jhtchina  阅读(186)  评论(0)    收藏  举报