HTML and CSS Reference
In-Depth Information
6.2.6.1. The ftp user and password
FTP is an authenticated service, meaning that you usually must have
a valid username and password in order to retrieve documents from
a server. However, most FTP servers also support restricted, nonau-
thenticated access known as
anonymous FTP
. In this mode, anyone can
supply the username "anonymous" or "guest" and be granted access to
a limited portion of the server's documents. Most FTP servers also as-
sume (but may not grant) anonymous access if the username and pass-
word are omitted.
If you are using an authenticated ftp URL to access a site that requires
a username and password, include the user and password components
in the URL, along with the colon (
:
) and at sign (
@
). If you keep the
user component and at sign but omit the password and the preceding
colon, most browsers prompt you for a password after connecting to the
FTP server. This is the recommended way of accessing authenticated re-
sources on an FTP server because it prevents others from seeing your
password.
We recommend you
never
place an ftp URL with a username and pass-
word in any HTML/XHTML document. The reasoning is simple: anyone
can retrieve the simple text document, extract the username and pass-
word from the URL, log into the FTP server, and tamper with its docu-
ments.
6.2.6.2. The ftp server and port
The ftp
server
and
port
operate by the same rules as the server and port
in an http URL. The server must be a valid Internet domain name or IP
address, and the optional port specifies the port on which the server is
listening for requests. If omitted, the default port number is 21.