You're almost as happy as you think you are.
如何给VSFTP增加用户,只能访问指定目录
1 增加组 groupadd ftpgroup
2 修改/etc/vsftpd/vsftpd.conf
将底下三行
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
改为
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
3 增加用户 useradd -g ftpgroup -d /dir/to -M ftpuser
4 设置用户口令 passwd ftpuser
5 编辑文件: /etc/vsftpd/chroot_list
内容为ftp用户名,每个用户占一行,如:
peter
john
6 重 新启动vsftpd
[root@home vsftpd]# /sbin/service vsftpd restart
第一次设置2~5,以后每增加一个用户,只需执行3~5即可.
Last 5 posts in 网络教程
- Centos中压缩(zip)和解压(unzip)命令 - August 17th, 2010
- Discuz X1有关short_open_tag 需要设置为on - July 17th, 2010
- 在Mac OS X 10.6 Snow Leopard上建立Apache, MySQL和PHP环境 - July 17th, 2010
- mac显示隐藏文件 - July 16th, 2010
- Nginx服务器下Discuz!X 的伪静态化 rewrite 规则 - July 5th, 2010
| Print article | This entry was posted by admin on 2010/02/08 at 10:05 pm, and is filed under 网络教程. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |