系统相关
首页 > 系统相关> > ubuntu安装vsftpd

ubuntu安装vsftpd

作者:互联网

1. 未学安装,先学卸载

apt remove --purge vsftpd

查看本地用户

root@santiagod-virtual-machine:~# tail -3 /etc/passwd
santiagod:x:1000:1000:santiagod,,,:/home/santiagod:/bin/bash
sshd:x:128:65534::/run/sshd:/usr/sbin/nologin
mysql:x:129:136:MySQL Server,,,:/nonexistent:/bin/false

 

2. 装包

apt install-y vsftpd

3. 启动服务

systemctl start vsftpd

再次查看本地用户

root@santiagod-virtual-machine:~# tail -3 /etc/passwd
sshd:x:128:65534::/run/sshd:/usr/sbin/nologin
mysql:x:129:136:MySQL Server,,,:/nonexistent:/bin/false
ftp:x:130:137:ftp daemon,,,:/srv/ftp:/usr/sbin/nologin
root@santiagod-virtual-machine:~# cat /etc/ftpusers 
# /etc/ftpusers: list of users disallowed FTP access. See ftpusers(5).

root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
nobody

4. 尝试修改ftp目录(默认:/srv/ftp),暂时失败

root@santiagod-virtual-machine:~# useradd -m myftp -d /home/myftp -s /sbin/nologin
root@santiagod-virtual-machine:~# tail -1 /etc/vsftpd.conf
local_root=/home/myftp
root@santiagod-virtual-machine:~# tail -1 /etc/passwd
myftp:x:1001:1001::/home/myftp:/sbin/nologin
root@santiagod-virtual-machine:~# echo "myftp:myftp" |chpasswd
BAD PASSWORD: The password is shorter than 8 characters
root@santiagod-virtual-machine:~# echo "myftp:Admin@123" |chpasswd
root@santiagod-virtual-machine:~# systemctl restart vsftpd

 

标签:root,virtual,machine,vsftpd,santiagod,myftp,ubuntu,安装
来源: https://www.cnblogs.com/santia-god/p/16421663.html