vsftpd (Very Secure FTPd Daemon) is a commonly used FTP server software under LINUX. Below I will briefly introduce the installation and configuration process.
First check if vsftpd is installed
# rpm -qa | Grep vsftpdIf it is already installed, its version number will be displayed. If there is no display after executing the command, the system is not installed.
Installation
The online installation method with YUM is the easiest:
# yum install vsftpd -yAfter executing the command, it starts to download and install automatically, and finally displays Complete means that the installation is OK.
Open port 21 in Linux (this is the default port used by FTP, you can also use your own port number, of course, if the configuration file of vsftpd needs to be modified accordingly, I will only introduce the default. 21 port)
# vi /etc/sysconfig/iptablesOpen the system configuration file and add a configuration code to open port 21:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 - j ACCEPTThen save the changes. Restart the firewall to make the configuration take effect.
# service iptables restartStarting the vsftpd service
# service vsftpd startIf successful, it will show Starting vsftpd for vsftpd: [OK]
# chkconfig Vsftpd on # netstate -tunlp | Grep vsftpdOutput tcp 0 0 0.0.0.0:21 means the service is running normally
Turn off anonymous login
Now you open the browser directly and type fpt://your server IP, you can open the default FTP directory. The default FTP directory path for vsftpd is /var/ftp/pub
Of course, we generally don't want FTP to log in anonymously. Modify the vsftpd configuration file to disable anonymous login.
Open the vsftp configuration file
# vi /etc/vsftpd/vsftpd.confSet the :anonymous_enable to NO, note that if the sentence starts with a #annotation, you need delete.
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).#anonymous_enable=YESanonymous_enable=NOAfter modifying and saving the configuration file, restart the vsftpd service
# service vsftpd restartAdding an FTP User
OK, since the anonymous service is turned off, which user is used to log in? At this time, you need to create a new user for vsftpd, which is the user you use when logging in to FTP.
# useradd -d /var/ftp/pub -s/sbin/nologin FTPuserNameSet the login password for this user:
# passwd FTPuserNameNow you can use this A user called FTPuserName logs in to FTP.
Modifying the read and write permissions of the FTP folder
Then you may also find out why you can't create or delete folders\\files because the /var/ftp/pub directory does not have permission to operate. This directory can be set to delete permissions.
# chmod 777 /var/ftp/pubftp default we use system users, now we add user ftptest, point to the directory /home/ftptest, the permission is nologin, that is, no shell permissions, no
# useradd ftptest -d /home/ftptest -s /sboginIf ftp is displayed: in/nol
useradd: warning: the home directory already exists. Not copying any File from skel directory into it.
Don't bother, just tell you that the directory you pointed to already exists, this does not affect the set of directories and their files, you can also use other grouping methods
# chown -R ftptest . ftptest /home/ftptestSet the password for the user hao32, customize it
# passwd ftptestAdd the user ftptest to /etc/vsftpd/In vsftpd.chroot_list, the user can log in normally and cannot jump out of his directory
# echo ‘ ftptest ′ >> /etc/vsftpd/vsftpd.chroot_list# service vsftpd restart
A system, we can not have only one user, so we need to create other users. This is especially true a
There are 7 startup levels in Linux: #0 - halt (Do NOT set initdefault to this)# 1 - Single
VNC software is provided from other machines connected to the remote interface linux system
Linux related use--Great God passed
How to restart the most secure after Linux crashes
Linux folder file creation, deletion
The difference between the linux command su and su- The maximum essential difference between the
How to share windows with virtual machine linux
Network Installation Debian 7 Wheezy System Graphic Tutorial
Linux system Shell if statement usage summary
Character encoding and conversion tool for files under GnuLinux
Linux service NFS and SAMBA services
Teach you Mac virtual machine to install Win8 dual system
How to disable the quick access bar of win10 system to display common folders?
How CentOS 6 modifies disk quota limits
What should I do if the Winodws 8 network connection is not available?
How to set the display language to English under Windows 10
Win8 how to turn on or off the magnifier
How does the Win10 system turn off the IPv6 protocol to improve the system speed?
Win10 application store server error how to do win10 system 0x80072EFD/0x800706d9 solution