zhongqihezu 2008-8-15 17:13
在Linux建立FTP服务器方法步骤
[font=宋体][size=14pt]在[/size][/font][size=14pt][font=Times New Roman]Linux[/font][/size][font=宋体][size=14pt]建立[/size][/font][size=14pt][font=Times New Roman]FTP[/font][/size][font=宋体][size=14pt]服务器方法步骤[/size][/font][size=14pt][/size]
[font=宋体]实现了[/font][font=Times New Roman]Apache[/font][font=宋体]多用户的虚拟主机设置,那么一般这些用户都会选择用[/font][font=Times New Roman]ftp[/font][font=宋体]上传的方式来管理自己的[/font][font=Times New Roman]web[/font][font=宋体]内容,这就需要我们再为他们开设[/font][font=Times New Roman]FTP[/font][font=宋体]服务。[/font][font=Times New Roman] Ubuntu[/font][font=宋体]自带的[/font][font=Times New Roman]FTP[/font][font=宋体]服务器是[/font][font=Times New Roman]vsftpd[/font][font=宋体]。[/font][font=Times New Roman]
1[/font][font=宋体]、安装[/font][font=Times New Roman]vsftpd
Ubuntu[/font][font=宋体]安装软件倒不是件困难的事,输入:[/font][font=Times New Roman]
sudo apt-get install vsftpd
[/font][font=宋体]如果没换源可能会提示你使用光盘,放进去再按回车就行了。[/font][font=Times New Roman]
[/font][font=宋体]我用[/font][font=Times New Roman]CN99[/font][font=宋体]的源[/font][font=Times New Roman],[/font][font=宋体]速度是[/font][font=Times New Roman]300K[/font][font=宋体]每秒[/font][font=Times New Roman],[/font][font=宋体]够快吧[/font][font=Times New Roman].
[/font][font=宋体]安装了之后会在[/font][font=Times New Roman]/home/[/font][font=宋体]下建立一个[/font][font=Times New Roman]ftp[/font][font=宋体]目录。这时候你可以试着访问下[/font][font=Times New Roman]ftp://IP[/font][font=宋体]地址。应该可以看到一个空白内容的[/font][font=Times New Roman]ftp[/font][font=宋体]空间。[/font][font=Times New Roman]
[/font][font=宋体]默认设置下匿名用户可以下载,但不能写入或是上传[/font][font=Times New Roman]
2[/font][font=宋体]、设置[/font][font=Times New Roman] vsftpd.conf[/font][font=宋体]文件[/font]
[font=宋体]现在我们要让匿名用户无法访问,并且得输入[/font][font=Times New Roman]linux[/font][font=宋体]上的用户密码后才能访问到他们自己目录里的内容。[/font][font=Times New Roman]
[/font][font=宋体]首先找到设置[/font][font=Times New Roman]vsftpd[/font][font=宋体]的文件,位置在[/font][font=Times New Roman]/etc/vsftpd.conf
[/font][font=宋体]修改之前最好先备份下这个文件:[/font][font=Times New Roman]
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.ol[`B;6] [`B;7] [/font]
[font=Times New Roman] [/font]