什么是FTP ACCT命令?

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.

这对我也没有多大帮助.有人打扰过这个吗?

是否可以在服务器上传递要匹配的字符串?
即创建可以获得不同访问权限的组?

最佳答案
USER指定用于授权的用户.获得授权后,用户可能需要在其拥有的各种帐户之间进行选择.虽然这可能不是大多数服务器的常见用例,但请记住,ftp不仅可用于每个用户只有一个帐户的系统,而且它是一个非常古老的协议,并且是针对大型机,VMS和其他人开发的.在分离授权和帐户时可能会有所不同或更灵活.

转载注明原文:什么是FTP ACCT命令? - 代码日志