ftp - FTP ACCT 命令的用途是什么?

标签 ftp protocols rfc

FTP协议(protocol)有很多可以使用的命令:

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 不仅可用于每个用户只有一个帐户的系统,而且它是一个非常古老的协议(protocol),并且是在大型机、VMS 和其他协议(protocol)的基础上开发的。分离授权和帐户时可能会有所不同或更灵活。

关于ftp - FTP ACCT 命令的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24974062/

相关文章:

java - JAX-RS/Jersey 响应 406 没有实体,但 RFC 2616 推荐一个

python - 如何使用 Python ftplib 获取 FTP 文件的修改时间

c - 在没有安全协议(protocol)的网页上使用curl

networking - 返回 N 比。选择性重复

swift - 在测试中模拟 UIView 扩展 "ApiProtocol"- swift4

c++ - 如何在 C 中实现 RFC 3393(Ipdv 数据包延迟变化)?

c# - FTP 在上传时检查文件是否存在以及是否在 C# 中重命名

python - 无法使用基于 python 的库 ftplib 连接到本地 FTP 服务器

c# - String.Split 针对 FTP 文件

http - 关于 cookie 和路径的 RFC 问题