Debian
Pure-FTPD chroot 無法在全新的 Debian 安裝上執行?
我試圖讓 chroot 與虛擬 Pure-FTPD 使用者一起工作,但由於某種原因,它根本不起作用。
我更改了以下選項:
/etc/default/pure-ftpd-common:
VIRTUALCHROOT=true
/etc/pure-ftpd/conf/ChrootEveryone:
yes
並添加了一個帶有主目錄的虛擬使用者,顯示如下:
Login : <someuser> Password : <foo> UID : 1003 (ftpuser) GID : 1003 (ftpgroup) Directory : /home/<homedir>/./
我在這裡想念什麼?
解決了。
原來我的 FTP 伺服器是通過 inetd 而不是獨立執行的。
在 inetd 模式下配置時,conf 目錄似乎被忽略了。
嘗試從使用者主目錄設置 VIRTUALCHROOT=false 和“/./”。
/etc/default/pure-ftpd-common:
VIRTUALCHROOT=false
貓 /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/密碼:
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