First build FTP.
Note: This example is installed in the REDHAT6 64 system; Most Linux configurations are the same
One. Installation
1. Confirm that the Yum source "my yum source is directly used Redhat disk is relatively simple, while confirming that the disc has been used Mount/dev/cdrom/media This command is attached to the/media"
rm-rf/etc/yum.repos.d/*
Vi/etc/yum.repos.d/yum.repo
[Yum]
Name=yum
Baseurl=file:///media
Enabled=1
Gpgcheck=0
Wq Save exit
2. Confirm the network configuration
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Onboot=yes
Bootproto=static
ipaddr=192.168.10.126
netmask=255.255.255.0
gateway=192.168.10.1
dns1=202.106.0.20
Wq Save
Detection: You can ping the gateway 192.168.10.1 detect if the
3. Install the required packages for FTP
Yum-y Install VSFTPD
Two. Configuration and explanation
FTP configuration file in the/etc/vsftpd/directory
Ftpusers---------used to specify which users cannot access the FTP server
②.user_list ---------used to add FTP users so that they can log on or not log on to the FTP server (in the same color font as detailed)
③.VSFTPD.CONFG ---------The main configuration file for FTP
The ②.FTP server starts when the vsftpd.conf file is detected first, if the following statement is detected in the file
Userlist_deny=yes
The user that exists in the User_list file is not allowed to log on to the FTP server, and yes is the default option for that sentenceUserlist_deny=noonly allow users in the file to log on to the FTP server, and other users cannot log on to the FTP server. The file is in the same format as ftpusers. If you want to add a user, each user name has a single row③.
User Login Control:
Anonymous_enable=yes, allowing anonymous users to log on.
No_anon_password=yes, anonymous users do not need to enter a password when they log on.
Local_enable=yes, allowing local users to log on.
Deny_email_enable=yes, you can create a file to save the blacklist of some anonymous emails to prevent these people from using Dos attacks.
Banned_email_file=/etc/vsftpd/banned_emails, the directory where the email blacklist is saved (default)
User Rights control:
Write_enable=yes, turn on global uploads
local_umask=022, the local file upload umask is set to 022, system default.
Anon_upload_enable=yes, allow anonymous users to upload, of course, in the case of Write_enable=yes. You must also create a directory that allows FTP users to read and write.
Anon_mkdir_write_enable=yes, allow anonymous to create a directory with flowers
Chown_uploads=yes, anonymous users upload the file is the main conversion to other users, the general recommendation is root.
Chown_username=whoever, change the whoever here to the owner to be converted, suggest root
Chroot_list_enable=yes, use a list to limit which users can only be active in their own directory.
Chroot_list_enable=/etc/vsftpd/chroot_list, specifying the user list file
Nopriv_user=ftpsecure, specify a secure account to allow FTP to be fully isolated and without privileged accounts
Other recommendations are not configured.
User connection and timeout settings:
idle_session_timeout=600, default time-out
data_connection_timeout=120, setting the default data connection time-out
Server logs and welcome information
Dirmessage_enable=yes, allowing information to be displayed for the configuration directory
Ftpd_banner=welcome to blah FTP service. Welcome information for FTP
Xferlog_enable=yes turning on the logging feature
Xferlog_file=/var/log/xferlog the location of the log record file
Three. Configuration Complete reboot
Service VSFTPD Restart
Four. Verify
Can be verified with Windows Server ftp://192.168.10.126
PS: Access vsftpd in cmd
Help available command query
Dir display
PWD current Directory
CD entry
Bin binary transfer (facilitates fast download
Get download
mkdir Creating a Directory
Mrdir Deleting a directory
Quit quitting
Five. Error
This service generally does not have a lot of error, sometimes found iptables problems
That is, service iptables stop or iptables-f to clear the firewall configuration
Build FTP and error on Linux