vsftpd配置只可上传不可下载

vsftpd限制用户只能上传不能下载 - 老男人(Sam)

Vsftpd - Ubuntu中文

1.安装vsftpd

yum  -y  install  vsftpd

2.修改配置文件:
备份配置文件:

cp vsftpd.conf vsftpd.conf.bak
vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO #此处将yes改为no,禁用匿名访问
local_enable=YES #启用本地认证登陆
download_enable=NO #禁止本地用户下载文件
write_enable=YES #允许
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
xferlog_enable=YES #开启日志
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES

3.允许root登录
  vsftpd设置-允许root账户登录ftp,将root账户前加上#号变为注释,即让root账户从禁止登录的用户列表中排除

vi /etc/vsftpd/user_list
vi /etc/vsftpd/ftpusers

4.服务自启动

systemctl enable vsftpd

5.查看服务状态

systemctl status vsftpd

6.服务重启

systemctl restart vsftpd

7.查看21端口

[root@yuanpengfei vsftpd]# netstat -npl|grep 21
tcp6 0 0 :::21 :::* LISTEN 111518/vsftpd
unix 2 [ ACC ] STREAM LISTENING 22189 1367/gdm @/tmp/dbus-seC3pAoJ
unix 2 [ ACC ] STREAM LISTENING 21144 2202/ibus-daemon @/tmp/dbus-c12gpmgf
unix 2 [ ACC ] STREAM LISTENING 22186 1367/gdm @/tmp/dbus-ee5G6k61
unix 2 [ ACC ] STREAM LISTENING 22185 1367/gdm @/tmp/dbus-UC8qNGgU
unix 2 [ ACC ] STREAM LISTENING 12019 2160/pulseaudio /run/user/42/pulse/native
unix 2 [ ACC ] STREAM LISTENING 22188 1367/gdm @/tmp/dbus-VE0S8PuV
[root@yuanpengfei vsftpd]#
posted @ 2021-11-05 13:45  CoderZZZ  阅读(804)  评论(0编辑  收藏  举报