ページ更新: 2004-08-14 (土) (5181日前)

関連: Cygwin/proftpd Linux

proftpdに関する覚え書き。

[編集]

Proftpd #

The ProFTPD Project

  • リリースノート (バグ修正履歴) などは 'NEWS' を見る。
[編集]

Memo #

[編集]

mod_ls (ソフト/proftpd) #

  • ListOptions で指定できるオプションを知りたかったので、ソースを眺めてみた。

SourceForge.net CVS Repository - markup - cvs: proftp/proftpd/modules/mod_ls.c

[編集]

ftps (2004-07-10) #

ProFTPD mini-HOWTO - SSL/TLS

セキュアFTPサーバの構築(ProFTPD+SSL/TLS)

[編集]

アップロード完了を調べる #

未確認。

アップロード完了を調べるには、

  1. ExtendedLog でアップロード(=WRITE)のログを出力する。
  2. ログの内容は LogFormat で少なくとも %m %s %f を出力して、
    1. methodがSTORであり、
    2. reply code が226であれば、 アップロードは完了していると思う。

たとえば、proftpd.confに次の設定を追加して、

LogFormat checkwrite "%t %u %s %f %m"
ExtendedLog /var/log/proftpd.write.log WRITE checkwrite

ファイルをアップロードすると、次のログが出力される。

[04/Apr/2004:12:56:46 +0900] username 226 /home/username/testdata STOR

規格/rfc/FTP

  • 4.1.3. FTP SERVICE COMMANDS
    STORE (STOR)
               This command causes the server-DTP to accept the data
               transferred via the data connection and to store the data as
               a file at the server site.  If the file specified in the
               pathname exists at the server site, then its contents shall
               be replaced by the data being transferred.  A new file is
               created at the server site if the file specified in the
               pathname does not already exist.
  • 4.2.1 Reply Codes by Function Groups
    226 Closing data connection.
                Requested file action successful (for example, file
                transfer or file abort).
[編集]

Directive #

[編集]

ExtendedLog #

http://www.proftpd.org/docs/directives/linked/config_ref_ExtendedLog.html

http://www.infoscience.co.jp/technical/proftpd/reference.html#ExtendedLog

[編集]

LogFormat #

http://www.proftpd.org/docs/directives/linked/config_ref_LogFormat.html

http://www.infoscience.co.jp/technical/proftpd/reference.html#LogFormat

%a
Remote client IP address
%A
Anonymous username (password given), or UNKNOWN if non-anonymous
%b
Bytes sent for request
%d
Directory name (not full path) for CDUP, CWD, MKD, RMD, XCWD, XCUP, XMKD, XRMD
%D
Directory name (full path) for CDUP, CWD, MKD, RMD, XCWD, XCUP, XMKD, XRMD
%{FOOBAR}e
Contents of environment variable FOOBAR. Note that the server does not set any environment variables itself.
%f
Filename stored or retrieved, absolute path (not chrooted)
%F
Filename stored or retrieved, as the client sees it
%h
Remote client DNS name
%J
Command arguments received from client, e.g. file.txt
%l
Remote username (from ident), or UNKNOWN if ident lookup failed
%L
Local server IP address
%m
Command (method) name received from client, e.g. RETR
%p
Local server port number
%P
Local server process id (pid)
%r
Full command line received from client
%s
Numeric FTP response code (status)
%t
Current local time
%{format}t
Current local time formatted (strftime(3) format)
%T
Time taken to transmit/receive file, in seconds
%u
Local authenticated userid
%U
USER name originally sent by the client
%v
ServerName of server handling session
%V
DNS name of server handling session