天天看点

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