Under Linux we use VSFTP as our FTP server.
Server Os:redhat 6.3
1. Check if VSFTPD is already installed on the server
Rpm-qa | grep vsftpd
2. If there is no corresponding vsftpd RPM package, we need to download the installation
Yum Install vsftpd
3. Configure the VSFTPD configuration file.
# ls/etc/vsftpd/
Ftpusers user_list vsftpd.conf vsftpd_conf_migrate.sh
Vim vsftpd.conf
The corresponding values are modified as follows:
anonymous_enable=NO#禁止匿名用户登录
Local_enable=yes #允许本地实体用户登录
Write_enable=yes #允许用户上传数据
local_umask=022 #建立新目录 (755) permission to file (644)
Dirmessage_enable=yes #若登录目录下有. Message displays the contents of the file and can create the. message file and write the information itself in the login directory
Xferlog_enable=yes #启动日志文件记录, recorded in/var/log/xferlog
Connect_from_port_20=yes #支持主动式连接功能
Xferlog_std_format=yes #支持WuFTP的日志文件格式
local_root=/home/xx/ftp #限制登录用户只能在/home/xx/ftp directory Operation
Chroot_local_user=yes #限制登录用户在主目录内local_root定义目录
Chroot_list Listen=yes #使用stand alone mode start VSFTPD
PAM_SERVICE_NAME=VSFTPD #支持PAM模块的管理
Userlist_enable=yes Account Login Control in the/etc/vsftpd/user_list file #支持
Firewall mechanism of Tcp_wrappers=yes #支持TCP wrappers
For the sake of security, we can edit the user_list file and add the account that is forbidden to log in to the system via FTP. In this case, these accounts try to log in remotely. will be denied login.
Give me a chestnut:
>FTP xxxxxxx
User (xxxxxx: (none)): Root
530 Permission denied.
Login failed.
I created a dedicated account TEST_FTP for FTP on the server, so I changed local_root=/home/xx/ftp to local_root=/in vsftpd.conf. Home/test_ftp/ftp
Files uploaded using the test_ftp account are then placed in the/home/test_ftp/ftp directory.
3. Restart the VSFTPD service and try to transfer the files using FTP.
Service VSFTPD Restart
4. Open the command line on another machine:
FTP xxxxxx
If the configuration goes well, you can now transfer files with FTP.
FTP Server built under Linux