Title: WP ProFTPd
Author: derricksmith01
Published: <strong>2011年5月1日</strong>
Last modified: 2020年10月5日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/wp-proftpd.svg)

# WP ProFTPd

 由[derricksmith01](https://profiles.wordpress.org/derricksmith01/)

[下載](https://downloads.wordpress.org/plugin/wp-proftpd.zip)

 * [詳情](https://zh-hk.wordpress.org/plugins/wp-proftpd/#description)
 * [評價](https://zh-hk.wordpress.org/plugins/wp-proftpd/#reviews)
 *  [安裝](https://zh-hk.wordpress.org/plugins/wp-proftpd/#installation)
 * [開發](https://zh-hk.wordpress.org/plugins/wp-proftpd/#developers)

 [支援](https://wordpress.org/support/plugin/wp-proftpd/)

## 描述

WP ProFTPd helps Authenticate ProFTPd users to FTP, SFTP, FTPS sites using the WordPress
database. This plugin creates stored procedures in the WordPress database that can
be used to query users, groups and user account information. A dashboard shows all
ProFTP logging information inside the WordPress Administration Portal.

### Features

 * Uses the WordPress database for ProFTPd authentication
 * Creates WordPress user meta to store information about access rights
 * Uses stored procedures to securely access the WordPress database
 * Creates a dashboard to show valuable authentication and FTP operations information
 * Supports FTP, SFTP, FTPS

### Requirements

 * PHP >= 5.5.0
 * WordPress >= 4.4
 * ProFTPd
 * WP Password Bcrypt

## 安裝

### WP Password Bcrypt WordPress Plugin Prerequisite

 1. Download latest Bcyrpt plugin at https://github.com/roots/wp-password-bcrypt/wp-
    password-bcrypt.php.
 2. Save wp-password-bcrypt.php to /wp-content/mu-plugins – Create mu-plugins folder
    if it does not exist.

### WP ProFTPd WordPress Plugin

 1. Download the plugin and upload to you WordPress site.
 2. Install the plugin.
 3. Configure a user for FTP access on the user profile page.
 4.  * Enabled = True
     * UID = 2001
     * GID = 2001
     * Home Directory = /srv/ftp/{username}
     * Shell = /sbin/nologin

### ProFTPd

(Ubuntu Installation)
 1. cd /opt 2. sudo apt-get -y install build-essential gettext
make g++ libwrap0-dev libsasl2-dev python-dev libmysql++-dev libpam0g-dev libssl-
dev unixodbc-dev libncurses5-dev libacl1-dev libcap-dev 3. sudo wget ftp://ftp.proftpd.
org/distrib/source/proftpd-1.3.7a.tar.gz 4. sudo tar -xvf proftpd-1.3.7a.tar.gz 
5. cd proftpd-1.3.7a 6. sudo ./configure –prefix=/usr –with-includes=/usr/include/
mysql –mandir=/usr/share/man –sysconfdir=/etc/proftpd –localstatedir=/var/run –libexecdir
=/usr/lib/proftpd –enable-sendfile –enable-facl –enable-dso –enable-autoshadow –
enable-ctrls –with-modules=mod_readme:mod_sql:mod_sql_passwd:mod_exec –enable-ipv6–
enable-nls –build x86_64-linux-gnu –with-shared=mod_unique_id:mod_site_misc:mod_load:
mod_ban:mod_quotatab:mod_sql:mod_sql_mysql:mod_dynmasq:mod_quotatab_sql:mod_ratio:
mod_tls:mod_rewrite:mod_radius:mod_wrap:mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_quotatab_file:
mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_sftp:mod_sftp_pam:mod_sftp_sql:
mod_shaper:mod_sql_passwd:mod_ifsession build_alias=x86_64-linux-gnu CFLAGS=-O2 
7. sudo make install 8. sudo groupadd -g 46 proftpd 9. sudo useradd -c proftpd -
d /srv/ftp -g proftpd -s /usr/bin/proftpdshell -u 46 proftpd 10. sudo install -v-
d -m775 -o proftpd -g proftpd /srv/ftp 11. sudo ln -v -s /bin/false /usr/bin/proftpdshell
12. sudo mkdir -p /etc/proftpd/ssl 13. sudo mkdir -p /var/log/proftpd 14. Create
file ‘proftpd’ using your favorite editor, copy script below

    ```
    #!/bin/sh

    # ProFTPD files
    FTPD_BIN=/usr/sbin/proftpd
    FTPD_CONF=/etc/proftpd/proftpd.conf
    PIDFILE=/var/run/proftpd.pid

    # If PIDFILE exists, does it point to a proftpd process?

    if [ -f $PIDFILE ]; then
        pid=`cat $PIDFILE`
    fi

    if [ ! -x $FTPD_BIN ]; then
        echo "$0: $FTPD_BIN: cannot execute"
        exit 1
    fi

    case $1 in

        start)
            if [ -n "$pid" ]; then
                echo "$0: proftpd [PID $pid] already running"
                exit
            fi

            if [ -r $FTPD_CONF ]; then
                echo "Starting proftpd..."

                $FTPD_BIN -c $FTPD_CONF

            else
                echo "$0: cannot start proftpd -- $FTPD_CONF missing"
            fi
        ;;

        stop)
            if [ -n "$pid" ]; then
                echo "Stopping proftpd..."
                kill -TERM $pid

            else
                echo "$0: proftpd not running"
                exit 1
            fi
        ;;

        restart)
            if [ -n "$pid" ]; then
            echo "Rehashing proftpd configuration"
            kill -TERM $pid

            else
                echo "$0: proftpd not running"
                xit 1
            fi
        ;;

        *)
            echo "usage: $0 {start|stop|restart}"
            exit 1
        ;;

    esac

    exit 0
    ```

 1. Edit file ‘/etc/proftpd/proftpd.conf’ using your favorite editor (FTP Type can 
    be “ftp”,”ftps”,”sftp” depending on the virtualhost configuration)
 2.     ```
            <Global>
                <IfModule mod_sql.c>
                    SQLBackend                      mysql
                    SQLAuthTypes                    bcrypt
                    SQLPasswordEngine               on
                    SQLPasswordEncoding             base64
                    SQLPasswordRounds               8
                    SQLEngine                       on
                    AuthOrder                       mod_sql.c
                    SQLConnectInfo                  {wordpress database name}@localhost {wordpress database user} "{wordpress database password}"
    
                    SQLAuthenticate                 users
                    SQLGroupInfo                    wp_proftpd_groups groupname gid members
    
                    SQLUserInfo custom:/get-user-by-name
    
                    # set min UID and GID - otherwise these are 999 each
                    SQLMinID        500
    
                    # Update count every time user logs in
                    SQLLog PASS updatecount
                    SQLNamedQuery updatecount FREEFORM "CALL wp_proftpd_update_count('%U')"
    
                    SqlLogFile /var/log/proftpd/sql.log
                    SQLLog PASS,DELE,MKD,RETR,RMD,RNFR,RNTO,STOR,APPE extendedlog
                    SQLNamedQuery extendedlog FREEFORM "CALL wp_proftpd_insert_log('%a', '%U', '%r')"
                </IfModule>
            </Global>
    
            <VirtualHost {x.x.x.x}>
                SQLNamedQuery get-user-by-name FREEFORM "CALL wp_proftpd_get_ftp_user_by_username('%U','{ftp_type}')"
            </VirtualHost>
        ```
    
 3. sudo mv proftpd /etc/init.d/proftpd
 4. sudo chmod 755 /etc/init.d/proftpd
 5. sudo ln -s /etc/init.d/proftpd /etc/init.d/proftpd_start
 6. sudo mv /etc/init.d/proftpd_start /etc/rc5.d
 7. sudo /etc/init.d/proftpd start OR sudo service proftpd start

#### Log File Locations

 1. Proftpd Service = /var/log/proftpd/proftpd.log
 2. Proftpd SQL = /var/log/proftpd/sql.log
 3. Proftpd Transfer = /var/log/proftpd/xfer.log

## 評價

There are no reviews for this plugin.

## 貢獻者及開發者

“WP ProFTPd” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

 *   [ derricksmith01 ](https://profiles.wordpress.org/derricksmith01/)

[將 WP ProFTPd 外掛本地化為台灣繁體中文版。](https://translate.wordpress.org/projects/wp-plugins/wp-proftpd)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/wp-proftpd/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/wp-proftpd/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/wp-proftpd/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/wp-proftpd/)。

## 其它

 *  Version **1.0.0**
 *  Last updated **6 年之前**
 *  Active installations **少於10**
 *  WordPress version ** 4.4 or higher **
 *  Tested up to **5.1.24**
 *  Language
 * [English (US)](https://wordpress.org/plugins/wp-proftpd/)
 * Tags
 * [authentication](https://zh-hk.wordpress.org/plugins/tags/authentication/)[ftp](https://zh-hk.wordpress.org/plugins/tags/ftp/)
 *  [進階顯示](https://zh-hk.wordpress.org/plugins/wp-proftpd/advanced/)

## 評分

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/wp-proftpd/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-proftpd/reviews/)

## 貢獻者

 *   [ derricksmith01 ](https://profiles.wordpress.org/derricksmith01/)

## 支援

有話想說？需要協助？

 [檢視支援論壇](https://wordpress.org/support/plugin/wp-proftpd/)

## 捐贈

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://derrick-smith.com)