In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "Centos7 installation ftp method". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Install vsftpd
#Install vsftpd
yum install -y vsftpd
systemctl start vsftpd.service #Start
Configure vsftpd.conf
The requested URL/etc/vsftpd/vsftpd.conf was not found on this server.
anonymous_enable=NO #Disable anonymous login
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES #Enable restricted users in their home directory
Add the following to the end of vsftpd.conf after #
allow_writable_chroot=YES #Add this
use_localtime=YES
listen_port=21
chroot_local_user=YES
idle_session_timeout=300
guest_enable=YES
guest_username=vsftpd
user_config_dir=/etc/vsftpd/vconf
data_connection_timeout=1
virtual_use_local_privs=YES
pasv_min_port=10060
pasv_max_port=10090
accept_timeout=5
connect_timeout=1
Create user files
#The first user name, the second password, can not use root as the user name
vi /etc/vsftpd/virtusers
ftproot
123456
test
123456
** Generate user data files **
db_load -T -t hash -f /etc/vsftpd/virtusers /etc/vsftpd/virtusers.db
#Set PAM authentication file and specify read from virtual user database file
chmod 600 /etc/vsftpd/virtusers.db
** Modify the/etc/pam.d/vsftpd file **
#Backup before modification
cp /etc/pam.d/vsftpd /etc/pam.d/vsftpd.bak
#comment out all configuration lines for auth and account
vi /etc/pam.d/vsftpd #Add the following
auth sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/virtusers
account sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/virtusers
** New system user vsftpd, user directory is/home/vsftpd**
#Set the user login terminal to/bin/false(i.e.: make it impossible to log in to the system)
useradd vsftpd -d /home/vsftpd -s /bin/false
chown -R vsftpd:vsftpd /home/vsftpd
** Create virtual user profiles **
mkdir /etc/vsftpd/vconf
cd /etc/vsftpd/vconf
#Create two virtual user matching files here
touch ftproot test
#Create user root directory
mkdir -p /home/vsftpd/ftproot/
#Edit ftproot user profile, content is as follows, other users are similar
vi ftproot
local_root=/home/vsftpd/ftproot/
write_enable=YES
anon_world_readable_only=NO
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
** Firewall Settings **
#If firewall and SELinux are enabled on the system, then the following configuration should also be done (by default centos7 uses firewall and selinux instead of iptables)
#Firewall Add FTP service:
firewall-cmd --permanent --zone=public --add-service=ftp
firewall-cmd --reload
#Setting up SELinux:
getsebool -a | grep ftp
setsebool -P ftpd_full_access on
Restart vsftpd server
systemctl stop vsftpd.service #Stop
systemctl start vsftpd.service #Start
systemctl status vsftpd.service #View status
"Centos7 installation ftp method" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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: 279
*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.