Feed on
Posts
Comments

今天突然想到要玩一下 Proftpd 的 MYSQL 虛擬帳號認證部份,我是用 FreeBSD 7.0 Release 下去安裝的,剛剛去看了一下官方網站,從 1.3.1rc1 版開始,支援 UTF-8 傳送跟接收了,請看 RELEASE_NOTES-1.3.1rc1,所以1.2.10版本之前的都不支援 UTF-8 不過台灣有人 patch 出來可以支援 Big5,現在都不用了,裡面有一段簡介

UseUTF8
Disables use of UTF8 encoding for file paths. If the --enable-nls
configure option is used, then UTF8 encoding support will be
enabled by default.

如果你的 server 是用此版本,或者是更高,請在編譯的時候加入 --enable-nls
--enable-nls
This configure option enables handling of translated message
catalogs for response messages, and [...]

Read Full Post »

昨天遇到這個問題,不過其實之前就有解決過這問題,只是忘記怎麼解決,之前是利用 MySQL 的方式建立帳號,因為相當方便,請參考這篇 [Linux] Ubuntu 6.06 Proftpd + Mysql 安裝方式,支援 /bin/false 跟 /sbin/nologin 也相當簡單
只要在 proftpd.conf 加上
RequireValidShell on
官網寫的 config_ref_RequireValidShell
然後在編輯 /etc/shells 加上
/sbin/nologin

Read Full Post »

ProFTPD Version 1.2.10
Mysql Version 4.1.0 支援 UTF8
請確定你的proftpd有支援sql module
proftpd -l | grep mysql

proftpd -l | grep sql
mod_sql.c
mod_sql_mysql.c
mod_quotatab_sql.c
確定有支援之後 再來就是建立mysql資料庫
* 建立 proftp 資料庫
CREATE DATABASE `ftp` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
* 建立使用者資料表
CREATE TABLE `ftp` (
`username` varchar( 60 ) DEFAULT NULL ,
`uid` int( 11 ) NOT NULL ,
`gid` int( 11 ) DEFAULT NULL ,
`password` varchar( 30 ) DEFAULT NULL [...]

Read Full Post »

系統 ubuntu 6.06 + proftpd 1.2.10
TLSEngine on
TLSLog /var/log/proftpd-tls.log
TLSProtocol TLSv1
TLSRequired on
TLSRSACertificateFile /etc/proftpd/HostCA.crt
TLSRSACertificateKeyFile /etc/proftpd/HostCA.key
TLSCACertificateFile /etc/proftpd/RootCA.crt
TLSVerifyClient off
虛擬帳號實做
AuthUserFile /etc/proftpd/proftpd.passwd
AuthGroupFile /etc/proftpd/proftpd.group
SystemLog /etc/proftpd/proftpd.syslog

TransferLog /var/log/xferlog
LogFormat awstats "%t %h %u %m %f %s %b"
ExtendedLog /var/log/xferlog read,write awstats
在linux底下如何新增帳號:
ftpasswd --passwd --file=/etc/proftpd/proftpd.passwd --name=test --uid=2000 --gid=1001 --home=/home/ftp --shell=/bin/false

Read Full Post »