Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15210167
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类: BSD

2008-05-05 08:31:03



    • (Chicago)。
    • 臺灣的Mirror站臺:
      •     義守大學FTP站
      •     信望愛FTP站
    • wget    
    •  本站。


  1. tar    zxvf    proftpd-1.2.4.tar.gz
    cd    proftpd-1.2.4
    # 請先查看INSTALL與README檔案。
    ./configure    --prefix=/usr/local/proftpd    
    make
    make    install


    • 建立 ftp 的 group 名稱,GID 為 21 。
      pw groupadd -n ftp -g 21
    • 建立ftp的帳號,UID 為 21:
      pw useradd -n ftp -b /home -m -s /nonexistent -c "Anonymous FTP Admin" -g ftp -u 21
    • 此時,ProFTPd 預設的使用者帳號 ftp 其根目錄在/home/ftp,請建立這個目錄,或是建立鏈結。
      mkdir /home/ftp
    • 修改ProFTPD的設定檔,更改根目錄名稱,並且加入二行新的設定。
      vi /usr/local/proftpd/etc/proftpd.conf

            # 在Anonymous設定區段中加入此二行。
           RequireValidShell    off
           意思是不要讓 proftpd 檢查 /etc/passwd 檔案內 ftp 使用者 shell。
           AnonRequirePassword    off
           意思是當匿名登入時,設定為不使用密碼。
    • 變更inetd
      vi /etc/inetd.conf,將ftp的那一行註解起來,
      kill -HUP `cat /var/run/inetd.pid`
    • 開機時就啟動ProFTPD,提供兩種方法,擇一選用就好:
      • 在/etc/rc.local中加入一行:
        /usr/local/proftpd/sbin/proftpd
      • 建立/usr/local/etc/rc.d/proftpd.sh檔:
        #!/bin/sh
        case "$1" in
        start)
                if [ -x /usr/local/proftpd/sbin/proftpd ]; then
                        /usr/local/proftpd/sbin/proftpd && echo -n ' proftpd'
                fi
                ;;
        stop)
                killall proftpd
                ;;
        *)
                echo "$0 start | stop"
                ;;
        esac
        				
    • 手動啟動ProFTPD
      /usr/local/proftpd/sbin/proftpd

    • log 在 /var/log/proftpd.log 裡

  2. 設定檔範例:
  3. 本站設定:


  4. 參考文件:
阅读(940) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~