APC: getting ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417.mib turned out to be tricky
Posted by jpluimers on 2016/08/24
I tried updating my downloads for my APC7920 and APC7921 PDUs.
I knew the APC download site http://www.apc.com/nl/en/tools/download/index.cfm was slow and navigation unfriendly (lots of ERR_CACHE_MISS
as you cannot ctrl-click on downloads), but it’s also buggy: Some of the ftp download URLs do not contain the authentication and one file would not download at all.
The solution for that is to prepend the credentials as username:password@ like these URLs where each first one is generated by the download site and each second one works:
ftp://ftp.apcc.com/restricted/hardware/nmcard/firmware/devipcfg_wiz/502/Device%20IP%20Configuration%20Wizard.exe
ftp://restrict:Kop$74!@ftp.apcc.com/restricted/hardware/nmcard/firmware/devipcfg_wiz/502/Device%20IP%20Configuration%20Wizard.exe
ftp://ftp.apc.com/restricted/hardware/nmcard/firmware/sec_wiz/104/SecWiz%201.04%20Install.exe
ftp://restrict:Kop$74!@ftp.apc.com/restricted/hardware/nmcard/firmware/sec_wiz/104/SecWiz%201.04%20Install.exe
The username is
restrict
and the passwordKop$74!
which requires single quotes on the command-line to prevent parameter and event expansion.Otherwise you will get
bash
errors like these:event not found
for the part starting with an exclamation mark andLogin incorrect.
for the parts having a dollar.
One file would not download at all: ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417
as all download attempts would time out:
- Chrome with and without username:password@ (you will get a
ERR_FTP_FAILED
) - wget with and without username:password@ (it will result in a
)
- plain curl with and without username:password@ (it will result in a
curl: (28) Timeout was reached
)
The only command that would work was this:
curl -G ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417.mib > powernet417.mib
via: SimplicityGuy/pynoc – Travis CI
The trick is to:
- leave username and password away
- specify the -G (or –get) parameter forcing GET behaviour (which should be the default).
I’m not sure why it works, but it does.
–jeroen
Leave a Reply