可能是一个愚蠢的问题,但是当连接到 FTP 服务器时,有时会有一个帐户选项。这与用户名有什么意义?
例如,从 Apache FTP 客户端查看此方法:
/**
* Login to the FTP server using the provided username, password,
* and account. If no account is required by the server, only
* the username and password, the account information is not used.
*
* @param username The username to login under.
* @param password The password to use.
* @param account The account to use.
* @return True if successfully completed, false if not.
* @throws FTPConnectionClosedException
* If the FTP server prematurely closes the connection as a result
* of the client being idle or some other reason causing the server
* to send FTP reply code 421. This exception may be caught either
* as an IOException or independently as itself.
* @throws IOException If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
*/
public boolean login(final String username, final String password, final String account)
throws IOException
{
....
}
“帐户”很少用于某些特定系统,如果有的话。您将知道何时需要使用它。大多数情况下你没有。这可能是一些遗留的东西。毕竟定义“帐户”功能的 FTP RFC 959是从 1985 年开始的!
这是 FTP RFC 959 对
ACCT
(帐户)命令的模糊表述: