service:proftpd
差異處
這裏顯示兩個版本的差異處。
| 下次修改 | 前次修改 | ||
| service:proftpd [2007/05/06 03:30] – 建立 wenpei | service:proftpd [2008/12/16 20:13] (目前版本) – wenpei | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== proftpd 使用 TLS 加密 ====== | ||
| + | ===== 產生金鑰 ===== | ||
| + | openssl genrsa -out proftpd.key2 1024 | ||
| + | |||
| + | openssl req -new -x509 -days 3650 -key proftpd.key -out proftpd.crt | ||
| + | |||
| + | < | ||
| + | Country Name (2 letter code) [AU]:TW | ||
| + | State or Province Name (full name) [Some-State]: | ||
| + | Locality Name (eg, city) []:Jhungli | ||
| + | Organization Name (eg, company) [Internet Widgits Pty Ltd]: | ||
| + | Organizational Unit Name (eg, section) []:FTP | ||
| + | Common Name (eg, YOUR name) []:sars.tw | ||
| + | Email Address []: | ||
| + | </ | ||
| + | |||
| + | chmod go-r proftpd.key proftpd.crt | ||
| + | |||
| + | mv proftpd.key proftpd.crt / | ||
| + | |||
| + | ===== 設定 tls.conf ===== | ||
| + | < | ||
| + | < | ||
| + | TLSEngine | ||
| + | TLSLog | ||
| + | TLSProtocol | ||
| + | TLSRSACertificateFile | ||
| + | TLSRSACertificateKeyFile | ||
| + | TLSVerifyClient | ||
| + | TLSRequired | ||
| + | TLSRenegotiate | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== 設定 proftpd.conf ===== | ||
| + | 在檔案中加入: | ||
| + | Include / | ||
| + | |||
| + | 並檢查 modules.conf 中是否有: | ||
| + | LoadModule mod_tls.c | ||
| + | |||
| ====== 用 mysql 管理 proftpd 帳號 ====== | ====== 用 mysql 管理 proftpd 帳號 ====== | ||
| + | http:// | ||
| + | |||
| http:// | http:// | ||
| http:// | http:// | ||
| - | ===== 支援 ===== | + | http://www.lslnet.com/ |
| - | 確定 proftpd 有支援 sql module | + | |
| - | # proftpd -l | grep sql | + | |
| - | mod_sql.c | + | |
| - | mod_sql_mysql.c | + | |
| - | mod_quotatab_sql.c | + | |
| ===== 建立資料庫 ===== | ===== 建立資料庫 ===== | ||
| 行 39: | 行 77: | ||
| ) TYPE = MYISAM; | ) TYPE = MYISAM; | ||
| + | ===== 建立 mysql 使用者 ===== | ||
| + | 建立使用者 proftpd,並指定 ftp 資料庫權限。 | ||
| + | |||
| + | ===== proftpd 設定 ===== | ||
| + | ==== proftpd.conf ==== | ||
| + | 使用 sql.conf 設定,檔案中要有這行: | ||
| + | Include / | ||
| + | |||
| + | ==== sql.conf ==== | ||
| + | < | ||
| + | < | ||
| + | SQLBackend | ||
| + | SQLEngine on | ||
| + | SQLAuthenticate on | ||
| + | SQLAuthTypes Crypt Plaintext | ||
| + | SQLConnectInfo ftp@localhost proftpd Cc: | ||
| + | SQLUserInfo ftp username password uid gid homedir shell | ||
| + | SQLGroupInfo groups groupname gid members | ||
| + | # | ||
| + | SQLLogFile / | ||
| + | PersistentPasswd off | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== 建立 group ===== | ||
| + | # groupadd ftpgroup | ||
| + | |||
| + | ===== 建立 user 和 group 資料 ===== | ||
| + | ===== 重新啟動 proftpd ===== | ||
| + | # / | ||
service/proftpd.1178393425.txt.gz · 上一次變更: (外部編輯)
