【发布时间】:2014-07-26 18:13:55
【问题描述】:
FTP协议有相当多的命令可以使用:
ABOR - abort a file transfer
CWD - change working directory
DELE - delete a remote file
LIST - list remote files
MDTM - return the modification time of a file
MKD - make a remote directory
NLST - name list of remote directory
PASS - send password
PASV - enter passive mode
PORT - open a data port
PWD - print working directory
QUIT - terminate the connection
RETR - retrieve a remote file
RMD - remove a remote directory
RNFR - rename from
RNTO - rename to
SITE - site-specific commands
SIZE - return the size of a file
STOR - store a file on the remote host
TYPE - set transfer type
USER - send username
和
ACCT - send account information
APPE - append to a remote file
CDUP - CWD to the parent of the current directory
HELP - return help on using the server
MODE - set transfer mode
NOOP - do nothing
REIN - reinitialize the connection
STAT - return server status
STOU - store a file uniquely
STRU - set file transfer structure
SYST - return system type
我感兴趣的是 ACCT 命令。即使很难,它也不是在所有 FTP 服务器中实现的,它必须来自某个地方。它的目的是什么?
来自 RFC 959:
ACCOUNT (ACCT)
The argument field is a Telnet string identifying the user's
account. The command is not necessarily related to the USER
command, as some sites may require an account for login and
others only for specific access, such as storing files. In
the latter case the command may arrive at any time.
There are reply codes to differentiate these cases for the
automation: when account information is required for login,
the response to a successful PASSword command is reply code
332. On the other hand, if account information is NOT
required for login, the reply to a successful PASSword
command is 230; and if the account information is needed for
a command issued later in the dialogue, the server should
return a 332 or 532 reply depending on whether it stores
(pending receipt of the ACCounT command) or discards the
command, respectively.
这对我也没有多大帮助。有人费心对此有所了解吗?
是否可以传递一个要在服务器上匹配的字符串?
即创建被授予不同访问权限的组或其他什么?
【问题讨论】:
-
有问题的字符串、它的含义以及它的用途取决于 ftp 服务器软件。它可能是识别登录的操作系统用户,或其他类型的帐户。
-
进入 RFC 的目的是什么?
-
能够识别要使用的帐户,与 USER 规范分开。
-
USER 和 ACCT 之间有什么区别? (...)
-
USER 指定用于授权的用户。一旦获得授权,用户可能需要在其拥有的各种帐户之间进行选择。虽然这可能不是大多数服务器的常见用例,但请记住,ftp 不仅适用于每个用户只有一个帐户的系统,而且它是一个非常古老的协议,并且是为大型机、VMS 和其他分离授权和帐户时可能会有所不同或更灵活。