1、修改配置文件
[[email protected] ~]# cat /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
local_root=/var/auth_ftproot #ftp根目录
chroot_local_user=YES
2、创建ftp登陆用户
##用户添加
useradd user01
echo 123123 |passwd --stdin user01
mkdir /var/auth_ftproot
chmod 775 /var/auth_ftproot
touch /var/auth_ftproot/a.file
##授权
groupadd g01
gpasswd -a user01 g01
chown :g01 /var/auth_ftproot/
ls -ld /var/auth_ftproot/
ls /var/auth_ftproot/
时间: 2024-10-03 22:37:31