[root@lfs /]# ( /mnt/lfs/usr/sbin/chroot /lfs /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf & )
[root@lfs /]# ( /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf & )
[root@lfs lfs]# ls -ARl
.:
total 40
drwxr-xr-x 2 root root 4096 Oct 23 18:29 bin
drwxr-xr-x 3 root root 4096 Oct 23 18:10 dev
drwxr-xr-x 3 root root 4096 Nov 4 17:29 etc
drwxr-xr-x 4 root root 4096 Nov 4 17:49 home
drwxr-xr-x 2 root root 4096 Oct 23 18:26 lib
drwxr-x--- 5 root root 4096 Oct 23 18:20 root
drwxr-xr-x 2 root root 4096 Nov 4 17:23 sbin
drwxrwxrwx 3 root root 4096 Nov 4 17:08 tmp
drwxr-xr-x 7 root root 4096 Nov 4 14:59 usr
drwxr-xr-x 3 root root 4096 Nov 4 14:55 var
./bin:
total 716
./dev:
total 4
crw-r--r-- 1 root root 1, 3 Oct 23 17:51 null
crw-rw-rw- 1 root root 5, 2 Oct 23 18:02 ptmx
drwxr-xr-x 2 root root 4096 Oct 23 17:51 pts
crw------- 1 root root 30, 36 Oct 23 18:09 tcp
crw------- 1 root root 30, 39 Oct 23 18:10 udp
crw-rw-rw- 1 root root 1, 5 Oct 23 18:10 zero
./dev/pts:
total 0
crw------- 1 root root 136, 0 Oct 23 17:51 0
./etc:
total 68
-rw-r--r-- 1 root root 151 Oct 23 17:51 hosts
-rw-r--r-- 1 root root 161 Nov 4 17:29 hosts.allow
-rw-r--r-- 1 root root 1686 Oct 23 17:51 nsswitch.conf
-rw-r--r-- 1 root root 1345 Nov 4 15:19 passwd
-rw-r--r-- 1 root root 19935 Oct 23 17:51 services
-r-------- 1 root root 966 Nov 4 15:19 shadow
drwxr-xr-x 2 root root 4096 Nov 4 17:47 vsftpd
-rw-r--r-- 1 root root 18 Nov 4 16:46 vsftpd.chroot_list
-rw------- 1 root root 3916 Nov 4 16:46 vsftpd.conf
-rw------- 1 root root 63 Nov 4 16:46 vsftpd.ftpusers
-rw------- 1 root root 300 Nov 4 16:46 vsftpd.user_list
./etc/vsftpd:
total 4
-rw------- 1 root root 4061 Nov 4 17:15 vsftpd.conf
./home:
total 8
drwx------ 2 ws root 4096 Nov 4 17:50 ws
./home/ws:
total 16
-rw------- 1 root root 19 Nov 4 17:50 .bash_history
-rw-r--r-- 1 root root 24 Nov 4 17:50 .bash_logout
-rw-r--r-- 1 root root 191 Nov 4 17:50 .bash_profile
-rw-r--r-- 1 root root 124 Nov 4 17:50 .bashrc
./lib:
total 4508
-rwxr-xr-x 1 root root 103044 Oct 23 17:59 ld-2.3.2.so
-rwxr-xr-x 1 root root 103044 Oct 23 18:05 ld-linux.so.2
-rwxr-xr-x 1 root root 1549556 Oct 23 18:00 libc-2.3.2.so
-rwxr-xr-x 1 root root 10916 Oct 23 18:26 libcap.so.1
-rwxr-xr-x 1 root root 10916 Oct 23 18:26 libcap.so.1.10
-rwxr-xr-x 1 root root 23668 Oct 23 18:00 libcrypt-2.3.2.so
-rwxr-xr-x 1 root root 23668 Oct 23 18:04 libcrypt.so.1
-rwxr-xr-x 1 root root 1549556 Oct 23 18:04 libc.so.6
-rwxr-xr-x 1 root root 15084 Oct 23 18:00 libdl-2.3.2.so
-rwxr-xr-x 1 root root 15084 Oct 23 18:04 libdl.so.2
-rwxr-xr-x 1 root root 211876 Oct 23 17:59 libm-2.3.2.so
-rwxr-xr-x 1 root root 211876 Oct 23 18:03 libm.so.6
-rwxr-xr-x 1 root root 255300 Oct 23 18:04 libncurses.so.5
-rwxr-xr-x 1 root root 91604 Oct 23 17:59 libnsl-2.3.2.so
-rwxr-xr-x 1 root root 91604 Oct 23 18:04 libnsl.so.1
-rwxr-xr-x 1 root root 18416 Oct 23 18:01 libnss_dns-2.3.2.so
-rwxr-xr-x 1 root root 52472 Oct 23 18:01 libnss_files-2.3.2.so
-rwxr-xr-x 1 root root 30448 Oct 23 18:03 libpam.so.0
-rwxr-xr-x 1 root root 30448 Oct 23 17:59 libpam.so.0.75
-rwxr-xr-x 1 root root 76552 Oct 23 18:01 libresolv-2.3.2.so
-rwxr-xr-x 1 root root 11784 Oct 23 18:04 libtermcap.so.2
-rwxr-xr-x 1 root root 11784 Oct 23 18:00 libtermcap.so.2.0.8
-rwxr-xr-x 1 root root 12696 Oct 23 18:00 libutil-2.3.2.so
-rwxr-xr-x 1 root root 12696 Oct 23 18:04 libutil.so.1
./root:
total 72
-rw-r--r-- 1 root root 1094 Oct 23 18:20 anaconda-ks.cfg
-rw------- 1 root root 10671 Oct 23 18:32 .bash_history
-rw-r--r-- 1 root root 24 Oct 23 18:20 .bash_logout
-rw-r--r-- 1 root root 234 Oct 23 18:20 .bash_profile
-rw-r--r-- 1 root root 176 Oct 23 18:20 .bashrc
-rw-r--r-- 1 root root 210 Oct 23 18:20 .cshrc
drwx------ 2 root root 4096 Oct 23 18:20 .gconfd
-rw-r--r-- 1 root root 11266 Oct 23 18:20 install.log
-rw-r--r-- 1 root root 2484 Oct 23 18:20 install.log.syslog
drwx------ 2 root root 4096 Oct 23 18:20 .ssh
drwxr-xr-x 2 root root 4096 Oct 23 18:20 .ssh2
-rw-r--r-- 1 root root 196 Oct 23 18:20 .tcshrc
-rw-r--r-- 1 root root 1126 Oct 23 18:20 .Xresources
./root/.gconfd:
total 0
./root/.ssh:
total 4
-rw-r--r-- 1 root root 1116 Oct 23 18:20 known_hosts
./root/.ssh2:
total 4
-rw------- 1 root root 512 Oct 23 18:20 random_seed
./sbin:
total 4
-rwxr-xr-x 1 root root 2912 Nov 4 17:23 nologin
./tmp:
total 698376
drwxrwxrwx 2 ftp root 4096 Oct 27 17:35 anon
./tmp/anon:
total 0
./usr:
total 20
d--------- 2 root root 4096 Nov 4 14:59 ftp_secure
drwxr-xr-x 2 root root 4096 Oct 23 18:27 lib
drwxr-xr-x 4 root root 4096 Oct 23 18:13 local
drwxr-xr-x 2 root root 4096 Oct 23 18:28 sbin
drwxr-xr-x 3 root root 4096 Oct 23 17:51 share
./usr/ftp_secure:
total 0
./usr/lib:
total 312
-rwxr-xr-x 1 root root 255300 Oct 23 18:00 libncurses.so.5.3
-rwxr-xr-x 1 root root 28452 Oct 23 18:27 libwrap.so.0
-rwxr-xr-x 1 root root 28452 Oct 23 18:27 libwrap.so.0.7.6
./usr/local:
total 8
drwxr-xr-x 2 root root 4096 Oct 23 17:51 lib
drwxr-xr-x 2 root root 4096 Oct 23 18:13 sbin
./usr/local/lib:
total 0
./usr/local/sbin:
total 0
./usr/sbin:
total 88
-rwxr-xr-x 1 root root 72512 Oct 23 18:28 vsftpd
./usr/share:
total 4
drwxr-xr-x 3 root root 4096 Oct 23 17:51 lib
./usr/share/lib:
total 4
drwxr-xr-x 3 root root 4096 Oct 23 17:51 zoneinfo
./usr/share/lib/zoneinfo:
total 4
drwxr-xr-x 2 root root 4096 Oct 23 17:51 US
./usr/share/lib/zoneinfo/US:
total 0
./var:
total 4
drwxr-xr-x 2 root root 4096 Nov 4 14:56 log
./var/log:
total 4
-rw------- 1 root root 1 Nov 4 14:56 vsftpd.log
[root@lfs lfs]#
原帖由 "dragondk" 发表:
vsftpd 应该不用这种方式来chroot
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT..........
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |