wu-ftpd メモ

VineLinux4.0b2 ではコンパイルとおりません
src/Makefile の bison -y を byacc に変更するか、
apt-get remove bison
すると通るかも。

DNS の逆引きができず接続遅くなったりする場合

./configure --disable-dns

/etc/ftpaccess

# deny anonymouse
class   all   real,guest *

greeting text ""

limit   all   10   Any              /etc/msgs/msg.dead
guestgroup hogefuga   # chroot user

readme  README*    login
readme  README*    cwd=*

message /welcome.msg            login
message .message                cwd=*

compress        yes             all
tar             yes             all

log commands real
log transfers real inbound,outbound

shutdown /etc/shutmsg

email root@example.com

# deny 0-99 and 65534>=
deny-uid %-99 %65534-
deny-gid %-99 %65534-

# allow
allow-uid ftp
allow-gid ftp

loginfails 5

/etc/passwd

/home/hogefuga/./  # ./ == chroot

ファイル作成

cd /home/hogefuga
mkdir bin
mkdir etc
mkdir dev
mkdir lib

cp /bin/ls bin/
ldd /bin/ls で出たライブラリをコピー

cd dev/
mknod zero c 3 12

cd ../etc
cp /etc/passwd .
cp /etc/group .

inetd.conf

ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd -l -a
# -l はログに出力
# -a はftpaccessの設定ファイルを使う

xinetd.d/wu-ftpd

# default: on
# description: The wu-ftpd FTP server serves FTP connections. It uses \
#       normal, unencrypted usernames and passwords for authentication.
service ftp
{
        disable = no
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/in.ftpd
        server_args             = -l -a
        log_on_success          += DURATION USERID
        log_on_failure          += USERID
        nice                    = 10
}

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

編集にはIDが必要です