天天看點

vsftpd參數cmds_allowed

<a href="http://blog.sina.com.cn/s/blog_506ed9e60100x8r1.html#SinaEditor_Temp_FontName">cmds_allowed</a>

  以逗号分隔的方式指定可用的FTP指令(post login. USER, PASS and QUIT 是始終可用的指令)。

  其他指令将被屏蔽。這是一個強有力的locking down一個FTP伺服器的手段。例如:cmds_allowed=PASV,RETR,QUIT(隻允許檢索檔案)

  cmds_allowed=ABOR,APPE,CWD,CDUP,FEAT,LIST,MKD,MDTM,PASS,PASV,PWD,QUIT,RETR,REST,

  STOR,STRU,TYPE,USER(支援上傳和下載下傳的斷點續傳等指令)。

(Warning: this is a technical document, not necessary for most FTP use.)

Note that commands marked with a * are not implemented in a number of FTP servers.

<a></a>

Syntax: ABOR

Aborts a file transfer currently in progress.

Syntax: ACCT account-info

Syntax: ALLO size [R max-record-size]

Allocates sufficient storage space to receive a file. If the maximum size of a record also needs to be known, that is sent as a second numeric parameter following a space, the capital letter "R", and another space.

Syntax: APPE remote-filename

Syntax: CDUP

Makes the parent of the current directory be the current directory.

Syntax: CWD remote-directory

Makes the given directory be the current directory on the remote host.

Syntax: DELE remote-filename

Deletes the given file on the remote host.

Syntax: HELP [command]

If a command is given, returns help on that command; otherwise, returns general help for the FTP server (usually a list of supported commands).

Syntax: LIST [remote-filespec]

Syntax: MDTM remote-filename

Returns the last-modified time of the given file on the remote host in the format "YYYYMMDDhhmmss": YYYY is the four-digit year, MM is the month from 01 to 12, DD is the day of the month from 01 to 31, hh is the hour from 00 to 23, mm is the minute from 00 to 59, and ss is the second from 00 to 59.

Syntax: MKD remote-directory

Creates the named directory on the remote host.

Syntax: MODE mode-character

Sets the transfer mode to one of:

S - Stream

B - Block

C - Compressed

The default mode is Stream.

Syntax: NLST [remote-directory]

Syntax: NOOP

Does nothing except return a response.

Syntax: PASS password

Syntax: PASV

Tells the server to enter "passive mode". In passive mode, the server will wait for the client to establish a connection with it rather than attempting to connect to a client-specified port. The server will respond with the address of the port it is listening on, with a message like:

227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)

where a1.a2.a3.a4 is the IP address and p1*256+p2 is the port number.

Syntax: PORT a1,a2,a3,a4,p1,p2

Specifies the host and port to which the server should connect for the next file transfer. This is interpreted as IP address a1.a2.a3.a4, port p1*256+p2.

Syntax: PWD

Returns the name of the current directory on the remote host.

Syntax: QUIT

Terminates the command connection.

Syntax: REIN

Syntax: REST position

Syntax: RETR remote-filename

Syntax: RMD remote-directory

Deletes the named directory on the remote host.

Syntax: RNFR from-filename

Syntax: RNTO to-filename

Syntax: SITE site-specific-command

Executes a site-specific command.

Syntax: SIZE remote-filename

Returns the size of the remote file as a decimal number.

Syntax: STAT [remote-filespec]

Syntax: STOR remote-filename

Syntax: STOU

Begins transmission of a file to the remote site; the remote filename will be unique in the current directory. The response from the server will include the filename.

Syntax: STRU structure-character

Sets the file structure for transfer to one of:

F - File (no structure)

R - Record structure

P - Page structure

The default structure is File.

Syntax: SYST

Syntax: TYPE type-character [second-type-character]

Sets the type of file to be transferred. type-character can be any of:

A - ASCII text

E - EBCDIC text

I - image (binary data)

L - local format

For A and E, the second-type-character specifies how the text should be interpreted. It can be:

N - Non-print (not destined for printing). This is the default if second-type-character is omitted.

T - Telnet format control (&lt;CR&gt;, &lt;FF&gt;, etc.)

C - ASA Carriage Control

For L, the second-type-character specifies the number of bits per byte on the local system, and may not be omitted.

Syntax: USER username

Send this command to begin the login process. username should be a valid username on the system, or "anonymous" to initiate an anonymous login.

==============================================================

<a href="http://blog.sina.com.cn/s/blog_506ed9e60100x8r1.html#SinaEditor_Temp_FontName">user_config_dir</a>

  這個強大的設定容許覆寫一些在手冊頁中指定的配置項(基于單個使用者的)。用法很簡單,最好結合範例。如果你把user_config_dir

  改為/etc/vsftpd_user_conf,那麼以chris登入,vsftpd将調用配置檔案/etc/vsftpd_user_conf/chris。

  預設值:無

系統Debug分析篇

1.調試指令

strace -p pid

2.跟蹤指定程序的PID

gdb -p pid

本文轉自pandazhai 51CTO部落格,原文連結:http://blog.51cto.com/dreamway/1045610