service:proftpd
差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版前次修改 下次修改 | 前次修改 | ||
| service:proftpd [2007/05/06 04:29] – 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:// | ||
| 行 7: | 行 48: | ||
| http:// | http:// | ||
| - | |||
| - | ===== 支援 ===== | ||
| - | 確定 proftpd 有支援 sql module | ||
| - | # proftpd -l | grep sql | ||
| - | mod_sql.c | ||
| - | mod_sql_mysql.c | ||
| - | mod_quotatab_sql.c | ||
| ===== 建立資料庫 ===== | ===== 建立資料庫 ===== | ||
| 行 47: | 行 81: | ||
| ===== proftpd 設定 ===== | ===== proftpd 設定 ===== | ||
| - | < | + | ==== proftpd.conf ==== |
| - | # used to connect to the database | + | 使用 sql.conf 設定,檔案中要有這行: |
| - | # databasename@host database_user user_password | + | |
| - | SQLConnectInfo | + | |
| - | + | ||
| - | # Here we tell ProFTPd the names of the database columns in the " | + | |
| - | # we want it to interact with. Match the names with those in the db | + | |
| - | SQLUserInfo | + | |
| - | + | ||
| - | # Here we tell ProFTPd the names of the database columns in the " | + | |
| - | # we want it to interact with. Again the names match with those in the db | + | |
| - | SQLGroupInfo | + | |
| - | + | ||
| - | # The passwords in MySQL are encrypted using CRYPT | + | |
| - | SQLAuthTypes | + | |
| - | SQLAuthenticate | + | |
| - | + | ||
| - | # set min UID and GID - otherwise these are 999 each | + | |
| - | # | + | |
| - | + | ||
| - | # create a user's home directory on demand if it doesn' | + | |
| - | SQLHomedirOnDemand on | + | |
| + | ==== 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 / | SQLLogFile / | ||
| PersistentPasswd off | PersistentPasswd off | ||
| - | + | </ | |
| - | # Update count every time user logs in | + | |
| - | SQLLog PASS updatecount | + | |
| - | SQLNamedQuery updatecount UPDATE " | + | |
| - | + | ||
| - | # Update modified everytime user uploads or deletes a file | + | |
| - | SQLLog | + | |
| - | SQLNamedQuery modified UPDATE " | + | |
| </ | </ | ||
service/proftpd.1178396991.txt.gz · 上一次變更: (外部編輯)
