建立受限的ftp方法:
在系统中添加只具有ftp权限而没有telnet权限的帐户:
[root@ip
-06 /]# useradd -/export/home/zhoucb -/sbin/nologin zhoucb

为新增帐户设置口令:
[root@ip
-06 /]# passwd zhoucb
Changing password 
for user zhoucb.
New UNIX password:
Retype 
new UNIX password:
passwd: all authentication tokens updated successfully.

编辑配置文件
/etc/vsftpd/vsftpd.conf,增加以下选项:
chroot_local_user
=NO
chroot_list_enable
=YES
chroot_list_file
=/etc/vsftpd.chroot_list

编辑
/etc/vsftpd.chroot_list文件,加入zhoucb

重新启动vsftp进程

nruftp:x:
501:0::/data1:/sbin/nologin
nruftp:x:
501:0::/data2:/sbin/nologin

相关文章:

  • 2022-12-23
  • 2021-06-17
  • 2021-04-06
  • 2021-12-31
  • 2021-06-23
  • 2021-11-30
  • 2021-12-05
  • 2021-12-03
猜你喜欢
  • 2021-12-17
  • 2022-02-08
  • 2022-01-17
  • 2021-07-25
  • 2021-07-23
  • 2022-01-19
相关资源
相似解决方案