|
[root@CnBJYwz01QNmoSmokepingL01 ~]# yum -y install vsftpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* epel: mirrors.aliyun.com
* extras: mirrors.btte.net
* updates: mirrors.btte.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-21.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================
Installing:
vsftpd x86_64 2.2.2-21.el6 base 155 k
Transaction Summary
==============================================================================================================================================================================
Install 1 Package(s)
Total download size: 155 k
Installed size: 340 k
Downloading Packages:
vsftpd-2.2.2-21.el6.x86_64.rpm | 155 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : vsftpd-2.2.2-21.el6.x86_64 1/1
Verifying : vsftpd-2.2.2-21.el6.x86_64 1/1
Installed:
vsftpd.x86_64 0:2.2.2-21.el6
Complete!
[root@CnBJYwz01QNmoSmokepingL01 ~]# rpm -ql vsftpd
/etc/logrotate.d/vsftpd
/etc/pam.d/vsftpd
/etc/rc.d/init.d/vsftpd
/etc/vsftpd
/etc/vsftpd/ftpusers
/etc/vsftpd/user_list
/etc/vsftpd/vsftpd.conf
/etc/vsftpd/vsftpd_conf_migrate.sh
/usr/sbin/vsftpd
/usr/share/doc/vsftpd-2.2.2
.......
/var/ftp //ftp服务的根目录
/var/ftp/pub
|
|
[root@CnBJYwz01QNmoSmokepingL01 ~]# /etc/init.d/vsftpd start
Starting vsftpd for vsftpd: [ OK ]
[root@CnBJYwz01QNmoSmokepingL01 ~]# chkconfig vsftpd on
[root@CnBJYwz01QNmoSmokepingL01 ~]#
|
|
匿名登陆ftp服务器
localhost:~ ray$ ftp 192.168.2.141
Connected to 192.168.2.141.
220 (vsFTPd 2.2.2)
Name (192.168.2.141:ray): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp> help
Commands may be abbreviated. Commands are:
! features mls prompt site
$ fget mlsd proxy size
account form mlst put sndbuf
append ftp mode pwd status
ascii gate modtime quit struct
bell get more quote sunique
binary glob mput rate system
bye hash mreget rcvbuf tenex
case help msend recv throttle
cd idle newer reget trace
cdup image nlist remopts type
chmod lcd nmap rename umask
close less ntrans reset unset
cr lpage open restart usage
debug lpwd page rhelp user
delete ls passive rmdir verbose
dir macdef pdir rstatus xferbuf
disconnect mdelete pls runique ?
edit mdir pmlsd send
epsv4 mget preserve sendport
exit mkdir progress set
ftp>
系统用户登陆
[localhost:~ ray$ ftp 192.168.2.142
Connected to 192.168.2.142.
220 (vsFTPd 2.2.2)
Name (192.168.2.142:ray): ray
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp>
ftp> ls
229 Entering Extended Passive Mode (|||59706|).
150 Here comes the directory listing.
226 Directory send OK.
ftp>
ftp> pwd
Remote directory: /home/ray
ftp>
|
|
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES #是否允许匿名用户登陆
# Uncomment this to allow local users to log in.
local_enable=YES #是否允许本地的系统用户登陆
# Uncomment this to enable any form of FTP write command.
write_enable=YES #是否允许上传文件
anon_upload_enable=YES #是否允许匿名用户上传文件,打开上传权限。注意:最终文件能否上传成功,取决于文件系统权限和文件共享权限
anon_mkdir_write_enable=YES #是否允许匿名用户创建目录
anon_other_write_enable=YES #是否允许匿名用户其他写动作,如:删除和修改
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES #当用进入目录,是否显示欢迎信息
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES #是否打开传输日志,记录上传下载的操作命令
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
xferlog_file=/var/log/xferlog #指定传输日志的路径
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES #是否允许上传文件完,修改用户属组
#chown_username=whoever #文件上传完,修改成用户属性
# You may change the default value for timing out an idle session.
#idle_session_timeout=600 #超时时间,控制连接
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120 #超时时间,数据连接
# 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 #是否将所有用户限制在主目录,YES为启用 NO禁用.(该项默认值是NO,即在安装vsftpd后不做配置的话,ftp用户是可以向上切换到要目录之外的)
#chroot_list_enable=YES #是否允许启用限制用户名单
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list #禁锢用户列表,文件需要主动创建
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES #是否为独立守护进程
userlist_enable=YES #是否启用/etc/vsftpd/user_list名单
userlist_deny=YES #yes表示/etc/vsftpd/user_list为黑名单,no为白名单,
#If vsftpd is in standalone mode, this is the maximum number of clients which may be connected. Any additional clients connecting will get an error message. The value 0 switches off the limit.
max_clients #限制最大客户端数量
#If vsftpd is in standalone mode, this is the maximum number of clients which may be connected from the same source internet address. A client will get an error message if they go over this limit. The value 0 switches off the limit.
max_per_ip #限制相同IP的连接客户端数量
|
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28572479/viewspace-2131982/ ,如需转载,请注明出处,否则将追究法律责任。