In the process of configuring FTP virtual users, there is also a way to configure them.
Yum-y Install VSFTPD
Cp/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf.bak
Edit vsftpd.conf
Turn on the following options:
Anonymous_enable=no
Local_enable=yes
Write_enable=yes
local_umask=022
Anon_mkdir_write_enable=no
Dirmessage_enable=yes
Xferlog_enable=yes
Connect_from_port_20=yes
Chown_uploads=no
Xferlog_file=/var/log/vsftpd.log
Xferlog_std_format=yes
Ascii_upload_enable=yes
Ascii_download_enable=yes
Ftpd_banner=welcome to blah FTP service.
Chroot_list_enable=yes
Chroot_list_file=/etc/vsftpd/chroot_list
Listen=yes
Pam_service_name=vsftpd
Userlist_enable=yes
Tcp_wrappers=yes
Use_localtime=yes
Pasv_enable=yes
User_config_dir=/etc/vsftpd/vsftpd_user_conf
The notes for the specific configuration can refer to the comments in the previous article.
Because we set the user lock and directory on the top of the config file: So the chroot_list we created in the profile directory is our FTP user.
Touch chroot_list
Create a user directory under/etc/vsftpd/
Create an FTP user useradd-m-d/home/test test-s/sbin/nologin and set the password!
mkdir vsftpd_user_conf
CD vsftpd_user_conf Touch user files
Cmds_allowed=feat,rest,cwd,list,mdtm,nlst,pass,pasv,port,pwd,quit,retr,size,stor,type,user,acct,appe,cdup,help , MODE,NOOP,REIN,STAT,STOU,STRU,SYST,MKD
Finally we configure the FTP user right in the user file, restart the VSFTPD service!
Here is a permission to insert a description of the document, I found on the internet!
vsftpd cmds_allowed Permissions Control
Cmds_allowed=abor,cwd,list,mdtm,mkd,nlst,pass,pasv,port,pwd,quit,retr,rmd,rnfr .......
Note: You must not use line breaks and spaces, otherwise there will be no effect.
Cwd-change Working Directory Change directories
List-list Remote Files Column directory
Mkd-make a remote directory new folder
Nlst-name List of remote directory
Pwd-print working directory displays the current working directory
Retr-retrieve a remote file download file
Stor-store a file on the remote host uploads files
Dele-delete A remote file delete files
Rmd-remove A remote directory delete directories
Rnfr-rename from Rename
Rnto-rename to rename
# Abor-abort A file transfer canceling the transfer of files
# cwd-change working Directory change directories
# dele-delete A remote file delete files
# list-list Remote Files column directory
# Mdtm-return The modification time of a file returns the update times for files
# Mkd-make A remote directory new folder
# nlst-name List of remote directory
# pass-send Password
# pasv-enter Passive Mode
# Port-open A data port opens a transport port
# Pwd-print Working directory displays the current working directory
# Quit-terminate the connection exit
# retr-retrieve A remote file download file
# Rmd-remove a remote directory
# Rnfr-rename from
# Rnto-rename to
# site-site-specific Commands
# Size-return the size of a file returns the FileSize
# Stor-store a file on the remote host uploading files
# Type-set Transfer TYPE
# user-send Username
# Less common commands:
# acct*-Send account information
# appe-append to a remote file
# CDUP-CWD to the parent of the current directory
# Help-return Help on using the server
# Mode-set Transfer MODE
# noop-do Nothing
# rein*-Reinitialize the connection
# Stat-return Server Status
# Stou-store a file uniquely
# Stru-set File transfer structure
# Syst-return System Type
This article is from the "years, the Allure" blog, please be sure to keep this source http://alca0126.blog.51cto.com/7826974/1775228
VSFTPD User Configuration No.2