3月 232011
 

HOWTO : Home made NAS server with Ubuntu 8.04.1 – Part III
[HOWTO] 用Ubuntu 8.04.1搭建NAS服务器 – Part III

Now, your Samba file server is up and working. It is high time to configure the vsFTP server. Anonymous users can download your file from your FTP server but they cannot upload and change anything in it. Local users can access their local home directories (read and write) by using FTP client, e.g. Filezilla or gFTP.
现在,Samba文件服务器已经就绪了,该配置vsFTP了。匿名用户可以从FTP服务器上下载,但不能上传和修改文件。本地用户可以访问自己的私有目录,使用Filezilla or gFTP等FTP客户端。

vsFTP

Edit the file at /etc/vsftpd.conf :
编辑配置文件/etc/vsftpd.conf:
sudo nano /etc/vsftpd.conf

Uncomment and change the following lines (removes the “#”in front of the entry) :
找到以下各行,去掉注释并改值:

anonymous_enable=YES
local_enable=YES
write_enable=YES
data_connection_timeout=120
chroot_local_user=YES

If you are behind a router or firewall, you need to add the following lines at the end of the file :
如果你在路由器或防火墙后面,需要在文件最后加入以下行:

pasv_enable=YES
pasv_promiscuous=YES
pasv_min_port=50000
pasv_max_port=50100
pasv_address=192.168.0.15

Change the ports 50000-50100 at your desire and add this port range to the router’s port forwarding section or virtual server section. The pasv_address should be the IP address of your server (yours may different from me).
按照你自己的要求设置端口范围50000-50100,并把这个端口范围加到路由器的端口转发或虚拟服务器设置。pasv_address设置的是你的服务器IP地址(和我的地址应该不一样)。

Remember to forward port 20 and 21 out at your router.
记住在路由器设置20和21端口,允许向外转发。

Anonymous users can download files from /home/ftp and you can put some files there for them to download.
匿名用户可以从/home/ftp目录中下载文件,你可以准备一些公共文件供下载。

To restart your vsFTPd :
重启动vsFTPd:

sudo /etc/init.d/vsftpd restart

 回复

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>