2013-11-21 107 views
0

我有一个使用wget创建cron作业的问题。 当我使用这个命令:wget没有明显的原因

wget -U http://example.com/wp-content/plugins/plugin_name/export.php 

我得到这个消息:

--2013-11-21 11:29:01-- http://example.com/wp-content/plugins/plugin_name/export.php 
Resolving example.com... 255.255.255.255 
Connecting to example.com|255.255.255.255|:80... connected. 
HTTP request sent, awaiting response... 403 Forbidden 
2013-11-21 11:29:01 ERROR 403: Forbidden.# 

于是我研究了这一点,并使用浏览器的欺骗伎俩像这样尝试:

wget -U 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4' http://example.com/wp-content/plugins/plugin_name/export.php 

但这种回报:

--2013-11-21 11:36:02-- http://example.com/wp-content/plugins/plugin_name/export.php 
Resolving example.com... 255.255.255.255 
Connecting to example.com|255.255.255.255|:80... connected. 
HTTP request sent, awaiting response... 404 Not Found 
2013-11-21 11:36:03 ERROR 404: Not Found. 

我找不到任何理由发生这种情况,我有点难住。 我没有运行任何一种代理拦截

回答

0

那么有一个明显的答案。该请求返回'403 Forbidden',表示客户端缺少身份验证或身份不足,或者服务器端用户缺少/不足访问权限。

你可以运行一个普通的浏览器w/o wget的请求吗?

+0

总之,是的,我可以 –

相关问题