[root@localhost vsftpd-2.0.3]# cp vsftpd.conf /etc
Copy pam verification file: (Most users using vsftpd are using the source) After the code is installed, you will encounter the problem that anonymous users can log in, and local users can't log in anyway. The reason is that vsftpd uses PAM authentication, and you need to copy a verification file for local users to access.)
[root@localhost vsftpd-2.0.3]# cp RedHat/vsftpd.pam /etc/pam.d/ftp
vsftpd configuration
vsftpd server configuration file is /etc/vsftpd.conf, its configuration options More, here I only choose a few common configuration options.
1. Anonymous user access is prohibited.
anonymous_enable=NO
2. Allow local users to log in and allow them to upload files.
local_enable=YES
write_enable=YES
For the above options to take effect, you must copy a pam verification file to /etc/pam.d and rename it to ftp. Of course, you can change to other names, but you must change the value of pam_service_name. The default is ftp.
3. Lock local users in the home directory and not switch to the previous directory.
chroot_local_user=YES
4. Some users are prohibited from logging in to the server through ftp.
If local_enable=YES is set, all users, including root, can also log in to the server via ftp. For security reasons, some users need to be restricted.
There are three options in vsftpd.conf:
userlist_deny=YES/NO
userlist_enalbe=YES
userlist_file=/etc/vsftpd.user_list
If userlist_deny=YES, /etc/vsftpd The username listed in .user_list is not allowed to log in to the ftp server; if userlist_deny=NO, the username listed in /etc/vsftpd.user_list is allowed to log in to the ftp server.
We only need to create the vsftpd.user_list file in the /etc directory. The file content is the username that allows login or login, and each user has one line.
5. Users are prohibited from modifying the permissions of files or folders via FTP.
chmod_enable=NO (default is YES)
6. Set the umask value of the file or folder uploaded by the local user.
local_umask=022 (default is 077)
The value of umask is set to 022. If the file is uploaded, the permission will be changed to 644, and if it is a folder, the permission will be changed to 755. When uploading a web page, if it is set to 077, there will be a problem that the user does not have permission to access the webpage, so it is recommended to set the value of umask to 022.
7. Add a user who can only log in to the server from ftp and cannot log in locally. Create a user ftpuser below, do not allow logging in locally, and create a password for that user. //This article comes from the computer software and hardware application network www.45it.com
[root@localhost root]# useradd –g ftp –s /sbin/nologin ftpuser
[root@localhost root]# passwd ftpuser
Changing password for user ftpuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
8. Let the vsftp server limit the total number of connections and the maximum number of connections per IP.
#Maximum 100 client connections allowed at the same time
max_clients=100
#Up to 3 threads per ip address
max_per_ip=3
vsftpd has many options in the configuration file, but Personally think that if you are setting up a simple ftp server, the above options are sufficient.
Internet analysis of IIS tools is quite a lot, but I did not meet the requirements of my requirement
Remote connection to Linux cloud server - command line mode 1. Remote connection
In this article, we will work together to see how shortcuts can help users improve their productivit
For anyone in any field, it is the first to start with a novice, and constantly improve their skills
Let's talk about cloud computing. Grasping the four basic characteristics is not to be fooled.
Server log cleanup and IIS log cleanup
How to do disk array and disk image
Secret: How is the Windows server attacked
In-depth analysis of IIS 6.0 (a)
IIS6 and IIS7 gzip compression for static files
The server does not support curl
Windows 2003 Campus Web Server Frequently Asked Questions
PHP probe recommendation: a good helper for detecting server environment
Configure Nginx subdomain generic resolution binding to a separate directory
Windows XP shutdown and automatic restart solution
Modify the time zone using the command line in Linux
Win10 custom installation command detailed Win10 installation custom setting method
U disk record how to eliminate
Win10 preview version 10125 homemade Chinese ios system image download address
How to disable the specified drive in Win8 system
How does Win7 cancel the disabled add-on? Cancel the method of disabling add-ons
140 Windows XP tips that novice novice can use
Win7 uses IE to open the webpage computer suddenly crashes how to solve
How to set the network interface hops to improve the Internet speed?