我试图让chroot与Pure-FTPD用户一起工作,但是由于某些原因,它根本无法工作。
我改变了以下选项:
的/ etc /默认/纯的ftpd-共同:
VIRTUALCHROOT=true
的/ etc /纯的ftpd / CONF / ChrootEveryone:
yes
并添加了一个家庭目录的虚拟用户,如下所示:
Login : <someuser> Password : <foo> UID : 1003 (ftpuser) GID : 1003 (ftpgroup) Directory : /home/<homedir>/./
我在这里错过了什么?
尝试从用户主目录设置VIRTUALCHROOT = false和“/./”。
的/ etc /默认/纯的ftpd-共同:
VIRTUALCHROOT=false
cat / etc / pure-ftpd / conf / ChrootEveryone:
yes
当重新启动时,存在-A选项:
/etc/init.d/pure-ftpd restart重新启动ftp服务器:运行:/ usr / sbin / pure-ftpd -l pam -O clf:/ var / log / pure-> ftpd / transfer.log -u 1000 -E -A -8 UTF-8 -B
/ etc / passwd中:
test:x:1001:1001::/home/test:/bin/sh
Chroot工作:
# ftp localhost Connected to localhost. 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 1 of 50 allowed. 220-Local time is now 11:03. Server port: 21. 220-This is a private system - No anonymous login 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 15 minutes of inactivity. Name (localhost:ooshro): test 331 User test OK. Password required Password: 230-User test has group access to: test 230 OK. Current restricted directory is / Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 200 PORT command successful 150 Connecting to port 40034 226-Options: -l 226 0 matches total
解决了它。
原来我的FTP服务器是通过inetd而不是独立运行的。
在inetd模式下configuration时,conf目录似乎被忽略。