标签:round install alt umask color load mes connect etc
环境说明:
1、配置本地源
2、主机IP为192.168.1.5
[root@ml ~]# yum -y install vsftpd #安装服务
[root@ml ~]# cd /etc/vsftpd/
[root@ml vsftpd]# cp vsftpd.conf vsftpd.conf.bak
[root@ml vsftpd]# grep -v "^# \|#$" vsftpd.conf.bak > vsftpd.conf
[root@ml vsftpd]# vim vsftpd.conf
1 anonymous_enable=YES 2 local_enable=YES 3 write_enable=YES 4 local_umask=022 5 #anon_upload_enable=YES 6 #anon_mkdir_write_enable=YES 7 dirmessage_enable=YES 8 xferlog_enable=YES 9 connect_from_port_20=YES 10 #chown_uploads=YES 11 #chown_username=whoever 12 #xferlog_file=/var/log/xferlog 13 xferlog_std_format=YES 14 #idle_session_timeout=600 15 #data_connection_timeout=120 16 #nopriv_user=ftpsecure 17 #async_abor_enable=YES 18 #ascii_upload_enable=YES 19 #ascii_download_enable=YES 20 #ftpd_banner=Welcome to blah FTP service. 21 #deny_email_enable=YES 22 #banned_email_file=/etc/vsftpd/banned_emails 23 chroot_local_user=YES 24 #chroot_list_enable=YES 25 #chroot_list_file=/etc/vsftpd/chroot_list 26 #ls_recurse_enable=YES 27 listen=NO 28 listen_ipv6=YES 29 allow_writeable_chroot=yes 30 user_config_dir=/etc/vsftpd/user 31 32 pam_service_name=vsftpd 33 userlist_enable=YES 34 tcp_wrappers=YES
[root@ml vsftpd]# mkdir user
[root@ml vsftpd]# vim user/ml
local_root=/opt/mulu
[root@ml vsftpd]# mkdir /opt/mulu/
[root@ml vsftpd]# echo 123 > /opt/mulu/test.txt
[root@ml vsftpd]# useradd ml
[root@ml vsftpd]# chown ml.ml -R /opt/mulu/
[root@ml vsftpd]# systemctl restart vsftpd
再禁锢一个用户再另一个目录:
[root@ml vsftpd]# useradd user1
[root@ml vsftpd]# passwd user1
[root@ml vsftpd]# mkdir /opt/mulu2
[root@ml vsftpd]# chown user1.user1 -R /opt/mulu2/
[root@ml vsftpd]# echo 123 > /opt/mulu2/user1.txt
[root@ml vsftpd]# vim user/user1
local_root=/opt/mulu2
[root@ml vsftpd]# systemctl restart vsftpd
标签:round install alt umask color load mes connect etc
原文地址:https://www.cnblogs.com/meml/p/12633610.html