ubuntu 10.04 LTS vsftp搭建

Prepare:

ubuntu10.04的ftp的家目录在/srv/ftp,修改家目录:

 

1 $sudo usermod -d /srv/ftp ftp 

 

/etc/vsftpd.conf

listen=YES
pasv_enable=YES

local_enable=YES
write_enable=YES

local_umask=022

no_anon_password=YES
anonymous_enable=YES
anon_world_readable_only=YES
anon_other_write_enable=YES
anon_mkdir_write_enable=YES
anon_upload_enable=YES
anon_umask=002

dirmessage_enable=YES

use_localtime=YES

xferlog_enable=YES

connect_from_port_20=YES

ascii_upload_enable=YES
ascii_download_enable=YES

ftpd_banner=Welcome to blah FTP service.

secure_chroot_dir=/var/run/vsftpd/empty

rsa_cert_file=/etc/ssl/private/vsftpd.pem
tcp_wrappers=YES

说明:

1.如果要打开匿名用户上传权限,那么另外还需要建立一个对应的上传目录,并且设置该目录的拥有者为ftp

2.如果出现错误提示:500 OOPS: vsftpd: refusing to run with writable anonymous root

那么一定是你的ftp家目录,也就是/srv/ftp的目录权限由问题,请将拥有者改为root,组改为ftp 

3.配置完,需要重新启动服务

 

$sudo service vsftpd restart 

 

or

 

$sudo /etc/init.d/vsftpd restart 

 


现在可以进行测试了,成功是必须的!

参考:

[1]. http://vbird.dic.ksu.edu.tw/linux_server/0410vsftpd/0410vsftpd-centos4.php 著名的鸟哥,你懂的!

[2].http://techblog.tgharold.com/2011/03/500-oops-vsftpd-refusing-to-run-with.html 

[3].man vsftpd.conf 


 

 

 

 

 

 

 

 

 

posted on 2012-04-02 11:35  vincent Van Gogh  阅读(532)  评论(0编辑  收藏  举报

导航