Specify the username
user and password
password on an
FTP server. Without this, or the corresponding startup option,
the password defaults to ‘
[email protected]’, normally used for anonymous
Another way to specify username and password is in the URL itself
(see URL Format). Either method reveals your password to anyone who
bothers to run
ps. To prevent the passwords from being seen,
store them in
.netrc, and make sure to protect
those files from other users with
chmod. If the passwords are
really important, do not leave them lying in those files either—edit
the files and delete them after Wget has started the download.
Don’t remove the temporary
.listing files generated by FTP
retrievals. Normally, these files contain the raw directory listings
received from FTP servers. Not removing them can be useful for
debugging purposes, or when you want to be able to easily check on the
contents of remote server directories (e.g. to verify that a mirror
you’re running is complete).
Note that even though Wget writes to a known filename for this file,
this is not a security hole in the scenario of a user making
.listing a symbolic link to
/etc/passwd or something and
root to run Wget in his or her directory. Depending on
the options used, either Wget will refuse to write to
making the globbing/recursion/time-stamping operation fail, or the
symbolic link will be deleted and replaced with the actual
.listing file, or the listing will be written to a
Even though this situation isn’t a problem, though,
never run Wget in a non-trusted user’s directory. A user could do
something as simple as linking
root to run Wget with ‘
-N’ or ‘
-r’ so the file
will be overwritten.
Turn off FTP globbing. Globbing refers to the use of shell-like
special characters (wildcards), like ‘
]’ to retrieve more than one file from the same directory at
By default, globbing will be turned on if the URL contains a globbing character. This option may be used to turn globbing on or off permanently.
You may have to quote the URL to protect it from being expanded by
your shell. Globbing makes Wget look for a directory listing, which is
system-specific. This is why it currently works only with Unix FTP
servers (and the ones emulating Unix
Disable the use of the passive FTP transfer mode. Passive FTP mandates that the client connect to the server to establish the data connection rather than the other way around.
If the machine is connected to the Internet directly, both passive and
active FTP should work equally well. Behind most firewall and NAT
configurations passive FTP has a better chance of working. However,
in some rare firewall configurations, active FTP actually works when
passive FTP doesn’t. If you suspect this to be the case, use this
option, or set
passive_ftp=off in your init file.
Preserve remote file permissions instead of permissions set by umask.
By default, when retrieving FTP directories recursively and a symbolic link is encountered, the symbolic link is traversed and the pointed-to files are retrieved. Currently, Wget does not traverse symbolic links to directories to download them recursively, though this feature may be added in the future.
--retr-symlinks=no’ is specified, the linked-to file is not
downloaded. Instead, a matching symbolic link is created on the local
filesystem. The pointed-to file will not be retrieved unless this recursive
retrieval would have encountered it separately and downloaded it anyway. This
option poses a security risk where a malicious FTP Server may cause Wget to
write to files outside of the intended directories through a specially crafted
Note that when retrieving a file (not a directory) because it was specified on the command-line, rather than because it was recursed to, this option has no effect. Symbolic links are always traversed in this case.
AUTH TLScommand: it assumes the server speaks FTPS and directly starts an SSL/TLS connection. If the attempt is successful, the session continues just like regular FTPS (
PROTare sent, etc.). Implicit FTPS is no longer a requirement for FTPS implementations, and thus many servers may not support it. If ‘
--ftps-implicit’ is passed and no explicit port number specified, the default port for implicit FTPS, 990, will be used, instead of the default port for the "normal" (explicit) FTPS which is the same as that of FTP, 21.
--no-ftps-resume-ssl’ is for.
PROT Ccommand to achieve this, which must be approved by the server.
AUTH TLScommand, or in the case of implicit FTPS, if the initial SSL/TLS connection attempt is rejected, it is considered that such server does not support FTPS.