- 论坛徽章:
- 0
|
转自:
http://blog.csdn.net/killerboy/archive/2008/02/25/2118060.aspx
1.安装
#cd /usr/ports/ftp/vsftpd && make install clean
2.运行vsftpd
#vi /usr/local/etc/vsftpd.conf
在里面加入一句listen=YES 保存后退出
#adduser ftp ls
229 Entering Extended Passive Mode (|||9778|)
150 Here comes the directory listing.
-rw-r--r-- 1 0 0 159207965 Dec 07 06:59 1.rmvb
-rw-r--r-- 1 0 1001 2649 Jan 11 05:41 xorg.conf.new
226 Directory send OK.
现在一般应用已经建好了
3.扩展应用
下面是我的vsftpd.conf文件
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
理解了上面的配置选项 再配置起来就不复杂了
比如我要建立一个wang的用户有上传和下载的权限
编辑vsftpd.conf找到
#local_enable=YES
#write_enable=YES 把注释去掉 重起服务器
再建一个wang的用户 客户端就可以wang 用户登陆了
C:\>ftp 192.168.1.4
Connected to 192.168.1.4.
220 (vsFTPd 2.0.6)
User (192.168.1.4:(none)): wang
331 Please specify the password.
Password:
230 Login successful.
ftp> bin
200 Switching to Binary mode.
ftp> put lame.exe
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 File receive OK.
ftp: 发送 153088 字节,用时 0.02Seconds 9568.00Kbytes/sec.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
index
lame.exe
226 Directory send OK.
ftp: 收到 17 字节,用时 0.00Seconds 17000.00Kbytes/sec.
ftp> del lame.exe
250 Delete operation successful.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/101001/showart_2007019.html |
|