Chinaunix首页 | 论坛 | 博客
  • 博客访问: 500262
  • 博文数量: 110
  • 博客积分: 3971
  • 博客等级: 中校
  • 技术积分: 1175
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-20 23:27
文章分类

全部博文(110)

文章存档

2015年(2)

2014年(1)

2013年(1)

2011年(9)

2010年(28)

2009年(12)

2008年(13)

2007年(23)

2006年(21)

我的朋友

分类: LINUX

2006-07-16 22:36:30


 

安装vsftpd
[root@linux ~]# yum -y install vsftpd ← 安装vsftpd
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/4]
core 100% |=========================| 1.1 kB 00:00
crash-hat [2/4]
crash-hat 100% |=========================| 951 B 00:00
extras [3/4]
extras 100% |=========================| 1.1 kB 00:00
updates [4/4]
updates 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 12 kB 00:00
crash-hat : ################################################## 44/44
Added 6 new packages, deleted 6 old in 0.78 seconds
primary.xml.gz 100% |=========================| 879 kB 00:00
extras : ################################################## 2470/2470
Added 19 new packages, deleted 3 old in 27.37 seconds
primary.xml.gz 100% |=========================| 94 kB 00:00
updates : ################################################## 314/314
Added 78 new packages, deleted 0 old in 6.94 seconds
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for vsftpd to pack into transaction set.
vsftpd-2.0.4-1.2.i386.rpm 100% |=========================| 17 kB 00:00
---> Package vsftpd.i386 0:2.0.4-1.2 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
vsftpd i386 2.0.4-1.2 core 135 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 135 k
Downloading Packages:
(1/1): vsftpd-2.0.4-1.2.i 100% |=========================| 135 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: vsftpd ######################### [1/1]

Installed: vsftpd.i386 0:2.0.4-1.2
Complete!

vsftpd的简单设定

[root@linux ~]# vi /etc/vsftpd/vsftpd.conf ← 编辑vsftpd的设定文件
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO 
← 禁止anonymous登陆(匿名)

# Activate logging of uploads/downloads.
xferlog_enable=YES 
← /var/log/vsftpd.log记录(1/3)

# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log 
← /var/log/vsftpd.log记录(2/3)

# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=NO 
← /var/log/vsftpd.log记录(3/3)

# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
ascii_upload_enable=YES 
← 允许ascii模式上传
ascii_download_enable=YES 
← 允许ascii模式下载

# You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service. 
← 登陆FTP后不表示FTP的版本

# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES 
← 禁止访问上一层目录
chroot_list_enable=YES 
← 启动允许访问上一层目录的用户列表
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list 
← 指定用户列表文件

# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
ls_recurse_enable=YES 
← 允许带目录删除

下面的追加
pasv_min_port=60000 ← PASV模式的最小端口
pasv_max_port=60030 
← PASV模式的最大端口
force_dot_files=Yes 
← 显示.xxxx文件

设置允许访问权限

[root@linux ~]# echo fedora >> /etc/vsftpd/chroot_list
 ↑ 追加用户fedora允许访问上一层目录
[root@linux ~]# echo fedora >> /etc/vsftpd/ftpusers
  如果要禁止用户fedora访问FTP的话追加在/etc/vsftpd/ftpusers.

启动vsftpd

[root@linux ~]# /etc/rc.d/init.d/vsftpd start ← 启动vsftpd

[root@linux ~]# chkconfig vsftpd on 
← 设定vsftpd开机自动启动

[root@linux ~]# chkconfig --list vsftpd 
← 确认
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 
← 确认2~5为on


本文引用地址:

阅读(1136) | 评论(0) | 转发(0) |
0

上一篇:Apache安装与设置

下一篇:安装MySql

给主人留下些什么吧!~~