作品分享
问答交流
发现
任务
客服工单
rpm -ivh libcap-devel-2.22-11.e17.x86_64.rpm rpm -ivh vsftpd-3.0.2-22.el7.x86_64.rpm
rpm -ivh /home/libcap-devel-2.22-11.e17.x86_64.rpm rpm -ivh /home/vsftpd-3.0.2-22.el7.x86_64.rpm
rpm -qa | grep vsftpd
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.backup.conf
vim /etc/vsftpd/ftp_auth
firAdmin01 123 firUser01 123 SecAdmin02 123 SecUser02 123
db_load -T -t hash -f /etc/vsftpd/ftp_auth.txt /etc/vsftpd/ftp_auth.db
vim /etc/pam.d/ftp_auth
account required pam_userdb.so db=/etc/vsftpd/ftp_auth auth required pam_userdb.so db=/etc/vsftpd/ftp_auth
mkdir -p /newDir/First mkdir -p /newDir/Second
useradd -s /sbin/nologin ftpadmin
passwd ftpadmin
Chown -R ftpadmin: ftpadmin /newDir
mkdir /etc/vsftpd/user_conf
vim /etc/vsftpd/user_conf/firAdmin01
local_root=/newDir/First guest_enable=YES guest_username=ftpadmin anon_world_readable_only=NO write_enable=YES download_enable=YES anon_umask=022
vim /etc/vsftpd/user_conf/firUser01
local_root=/newDir/First guest_enable=YES guest_username=ftpadmin anon_world_readable_only=NO write_enable=YES download_enable=NO anon_umask=022 anon_upload_enable=YES anon_mkdir_write_enable=NO anon_other_write_enable=NO
vim /etc/vsftpd/user_conf/secAdmin01
local_root=/newDir/Second guest_enable=YES guest_username=ftpadmin anon_world_readable_only=NO write_enable=YES download_enable=YES anon_umask=022 anon_upload_enable=NO anon_mkdir_write_enable=YES anon_other_write_enable=NO
vim /etc/vsftpd/user_conf/secUser02
local_root=/newDir/Second guest_enable=YES guest_username=ftpadmin anon_world_readable_only=NO write_enable=YES download_enable=NO anon_umask=022 anon_upload_enable=NO anon_mkdir_write_enable=NO anon_other_write_enable=YES
vim /etc/vsftpd/chroot_list
:wq
vim /etc/vsftpd/vsftpd.conf
anonymous_enable=NO allow_writeable_chroot=YES guest_service_name=ftp_auth guest_enable=YES guest_username=ftpadmin userlist_enable=YES user_config_dir=/etc/vsftpd/user_conf allow_writeable_chroot=YES
systemctl restart vsftpd.service
举报
Powered by CangBaoKu v1.0 小黑屋藏宝库It社区( 冀ICP备14008649号 )
GMT+8, 2024-12-23 00:14, Processed in 0.154395 second(s), 35 queries.© 2003-2025 cbk Team.