Monday, February 6, 2012

Unix: wget Error 403: forbidden

when trying command:
$wget www.site.com/file.csv

You may get error like:

Resolving www.site.com... X.X.X.X
Connecting to www.site.com|X.X.X.X|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
 ERROR 403: Forbidden.

This happen when useragent value is not added with http message. When wget without any argument then useragent value will be empty in http message.

To add the useragent use this command:

$wget -U firefox http://www.site.com/file.csv



No comments: