0

I'm trying to download some data from an ftp site but am having trouble with the log on. I know the username/password is correct because it works when I use ftp interactively. However when I try using wget I get:

Logging in as $username...
Login incorrect.

I've tried the following commands from the command line:

wget -r -nd -A "path/to/data/*/*hdf" --ftp-user=$username --ftp-password=$password ftp:$ftpSite

wget -r -nd -A "path/to/data/*/*hdf" --user=$username --password=$password ftp:$ftpSite

wget -r -nd -A "path/to/data/*/*hdf" --ftp-user=$username --ask-password ftp:$ftpSite

wget -r -nd -A "path/to/data/*/*hdf" --user=$username --ask-password ftp:$ftpSite

And I always get the same "Login incorrect" failure.

I am running from the command line without using variables. I am only using variables in this question to censor sensitive info.

I would use mget in ftp but it's my understanding that I can't use wildcards to grab files from multiple subdirectories. When I try "mget */*hdf" I get a "No such file or directory" error. However I know the data is there, because when I cd into one of the subdirectories and do "mget *hdf", it works

0

User name and password settings specified in .netrc prevail over command line options --user=* of wget, so it ignores user name given in the command line.

Please check your ~/.netrc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.