Java教程

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

 

这篇关于ubuntu安装vsftpd的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!