Super菜鸟的求助 -关于配vsftpd的FTP服务

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
xmp123
帖子: 21
注册时间: 2007-03-08 9:36
送出感谢: 0
接收感谢: 0
联系:

Super菜鸟的求助 -关于配vsftpd的FTP服务

#1

帖子 xmp123 » 2007-03-09 11:51

首先说一下,我安装的字题不知道怎么翻下一个page. . (Ye字打不出来,真痛苦)。

正题: 我想搞一个FTP服务,我的需求很简单,就是想从我旁边的win computer可以看到我在linux下面的文件。。。

我看了wiki里面的相关的文章,JiBen上看不太懂.

我是安装这篇文章做的.

----------------------------------------------------------

Vsftpd is the most easy ftp server to setup.

Installing vsftpd:

sudo apt-get install vsftpd


The configuration file for vsftpd is located in /etc/vsftpd.conf. The default configuration is a little bit paranoid, not so usable for file sharing. So use this configuration instead:

# Put in /etc/vsftpd.conf
# Don't forget to change samurai into your local username
listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=samurai
ftpd_banner=Welcome to blah FTP service.
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/vsftpd.pem
anon_root=/home/ftp


Don't forget to backup before you use this configuration.

sudo cp /etc/vsftpd.conf /root/


Now we must make writable directory for anonymous user.

cd /home/ftp
sudo mkdir opendir
sudo chmod 777 opendir/


Ok, I explain this. In my local system, I have user named 'samurai'. With this configuration, I can log into ftp server with local user, that is 'samurai'. 'samurai' can go anywhere, create files, delete files, etc as long as he has sufficient permission.

With this configuration I can log into ftp server with anonymous user ( without username and password ). After logging in, the anonymous user jailed in /home/ftp directory ( pointed by anon_root ). I can't go outside. I can download files from /home/ftp directory but not create, delete anything from this directory. But I can write and delete files in opendir. If I write files in opendir or upload files in opendir, the files automatically belong to 'samurai' user.

To run this server:

sudo /etc/init.d/vsftpd start

To stop it:

sudo /etc/init.d/vsftpd stop

To restart it:

sudo /etc/init.d/vsftpd restart


Now it is usable for file sharing, right?!!!!

-----------------------------------------------

Address: http://www.ubuntuforums.org/archive/ind ... 91887.html

我照做了, 但是我用 sudo /etc/init.d/vsftpd start命令没有反应.....

从旁边的computer visite : //172.16.202.42 ........ (Failed)

但是如果我rm /etc/vsftpd.conf, 那么再用这个命令:

root@hut-desktop:/etc# sudo /etc/init.d/vsftpd start
* Starting FTP server: vsftpd [ ok ]

从旁边的computer visite : //172.16.202.42 ........ (还是Failed)

请问我哪里出了问题, 谢谢先....
xmp123
帖子: 21
注册时间: 2007-03-08 9:36
送出感谢: 0
接收感谢: 0
联系:

#2

帖子 xmp123 » 2007-03-09 16:53

问题已经解决啦。

21号端口被wu-ftpd占用。这样得情况下无法起动 vsftpd.....

同事三下两下搞定,羡慕中.....
回复

回到 “服务器基础应用”