Ubuntu20 安装配置FTP服务器

By | 2022-11-29

以下所有操作均在root权限下操作

1、安装vsftpd

apt install vsftpd

2、修改配置文件

vim /etc/vsftpd.conf

这三条必须打开,其它不用动

# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES

3、重启服务器

service vsftpd restart

4、创建目录和FTP用户

cd /home
mkdir ftp
useradd -d /home/ftp -M myftp
passwd myftp

5、更改目录所有者和分组

chown myftp ftp # 指定ftp目录的所有者为myftp
chgrp myftp ftp # 指定ftp目录的组为myftp

6、最后客户端连接

发表评论

邮箱地址不会被公开。 必填项已用*标注