Wofür wird das Kontofeld auf einem FTP-Server im Vergleich zum Benutzernamen verwendet?

Wofür wird das Kontofeld auf einem FTP-Server im Vergleich zum Benutzernamen verwendet?

Wahrscheinlich eine dumme Frage, aber bei der Verbindung mit FTP-Servern gibt es manchmal eine Option für ein Konto. Welche Bedeutung hat dies im Vergleich zum Benutzernamen?

Sehen Sie sich beispielsweise diese Methode des Apache FTP-Clients an:

/**
 * 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
{
    ....
}

Antwort1

Das "Konto" wird bei bestimmten Systemen nur selten oder überhaupt nie verwendet. Sie werden wissen, wann Sie es brauchen. Meistens nicht. Es handelt sich wahrscheinlich um veraltete Dinge. Schließlich ist FTPRFC 959das die Funktion „Konto“ definiert, ist von 1985!

Dies ist, was FTP RFC 959 vage über den ACCT(Konto-)Befehl sagt:

Das Argumentfeld ist eine Telnet-Zeichenfolge, die das Benutzerkonto identifiziert. Der Befehl muss nicht unbedingt mit dem USER-Befehl verwandt sein, da manche Sites ein Konto für die Anmeldung erfordern und andere nur für bestimmte Zugriffe, wie z. B. das Speichern von Dateien. Im letzteren Fall kann der Befehl jederzeit eintreffen.

verwandte Informationen