FTP服务器部署

记录在阿里云服务器上部署FTP

需求

  1. 用户有访问指定目录的权限
  2. 用户只能在当前目录
  3. 可以通过浏览器访问ftp

过程:

  1. 添加用户:
    useradd -s /sbin/nologin -d /home/ftpuser ftpuser
    -s : 限制用户不能登陆终端
    -d :指定用户主目录
  2. 配置vsftp服务器:
#进入vsftpd的配置文件
vim /etc/vsftpd/vsftpd.conf

# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume 

配置解析:
chroot_local_user=YES //限制所有用户在自己的目录下不能更改
ch

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值