码迷,mamicode.com
首页 > 系统相关 > 详细

Linux下创建ftp用户并锁定根目录

时间:2016-06-04 14:50:31      阅读:446      评论:0      收藏:0      [点我收藏+]

标签:

 

[root@d vsftpd]# vi /etc/vsftpd/chroot_list 
加入要锁定根目录的ftp用户名(一行只能一个用户)
[root@ vsftpd]# vi /etc/vsftpd/vsftpd.conf 
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
[root@d vsftpd]# service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                [  OK  ]

 

[root@ok ~]# ftp 132.57.180.230
Connected to 132.57.180.230 (132.57.180.230).
220 (vsFTPd 2.2.2)
Name (132.57.180.230:root): ftpwww
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/"
ftp> ls
227 Entering Passive Mode (132,57,180,130,28,59).
150 Here comes the directory listing.
drwxr-xr-x    4 500      500          4096 Jun 02 06:52 x.xxxxx.com
drwxr-xr-x   26 500      500          4096 Jan 12 03:48 phpwind
drwxrwxr-x   20 500      500          4096 Jun 02 02:34 rx
drwxrwxrwx    7 0        0            4096 May 09 07:12 hhhz
226 Directory send OK.

 

Linux下创建ftp用户并锁定根目录

标签:

原文地址:http://www.cnblogs.com/bass6/p/5558644.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!