In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the example analysis of VSFTP configuration, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.
Use rpm to install the package.
# rpm -ivh vsftpd-2.0.1-5.i386.rpm
After installation, you can start vsftp service by default.
[root@localhost ~]# service vsftpd start
Starting vsftpd for vsftpd: [ OK ]
But by default we can only watch, not upload.
1. Below we turn on anonymous user uploads
[root@localhost /]# vi /etc/vsftpd/vsftpd.conf
anon_upload_enable=YES
anon_mkdir_write_enable=YES
Remove the previous #
[root@localhost /]# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
2. Imprison FTP local users in the host directory
Add settings to the vsftpd.conf file.
chroot_local_user=YES
Restart vsftpd service.
# service vsftpd restart
3. Create a virtual account
a, establishing a virtual user password library file.
[root@localhost ~]# cat logins.txt
mike
123
john
321
Odd lines in the password library file set user names, even lines set passwords.
b, generate vsftpd authentication file (installed on CD 3).
[root@localhost RPMS]# rpm -ivh db4-utils-4.2.52-7.1.i386.rpm
warning: db4-utils-4.2.52-7.1.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:db4-utils ########################################### [100%]
[root@localhost RPMS]# db_load -T -t hash -f/root/logins. txt/etc/vsftpd/vsftpd_login.db Generate authentication files.
c. Set the authentication file to be readable and writable only by the user.
# chmod 600 /etc/vsftpd/vsftpd_login.db
d, establishing PAM configuration files required by virtual users.
Manually create the vsftpd.vu file.
# cat /etc/pam.d/vsftpd.vu
auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
e, establishing virtual users and directories to be accessed and setting corresponding permissions.
Create system user accounts for all FTP virtual user accounts, and set the permissions of the account host directory.
# useradd -d /home/ftpsite virtual
# chmod 700 /home/ftpsite
f, set the vsftpd.conf configuration file.
Add the virtual user's profile to the profile.
guest_enable=YES
guest_username=virtual
pam_service_name=vsftpd.vu
Restart vsftpd service.
g. After modifying the vsftpd.conf file, restart the vsftpd service program.
# service vsftpd restart
should be able to log in with virtual accounts now,
4. Set different permissions for virtual users
Set up the master profile.
Add user profile directory settings to vsftpd.conf file.
user_config_dir=/etc/vsftpd_user_conf
Create a directory of user profiles.
Use the mkdir command to create a directory of user profiles.
# mkdir /etc/vsftpd_user_conf
Create separate profiles for virtual users.
The user profile name is the same as the username.
/etc/vsftpd_user_conf/mike
/etc/vsftpd_user_conf/john
It reads as follows:
anon_world_readable_only=NO indicates that users can browse FTP directories and download files
anon_upload_enable=YES indicates that the user can upload files
anon_mkdir_write_enable=YES indicates that the user has permission to create and delete directories
anon_other_write_enable=YES indicates that the user has permission to rename and delete files
No configuration item defaults to vsftpd.conf configuration content
5. FTP server resource limitations
max_clients=100 Maximum number of client connections allowed
max_per_ip=5 Maximum number of client connections for the same IP
local_max_rate=5000000 Sets the maximum transmission rate for local users
anon_max_rate=2000000 Maximum transmission rate for anonymous users
()
Thank you for reading this article carefully. I hope that the article "Sample Analysis of VSFTP Configuration" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you more and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.