/usr/bin/wget: Permission denied

10 08 2006

If you’ve ever got the error /bin/sh: /usr/bin/wget: Permission denied when trying to execute a .php script using a cron job, spent minutes/hours trying to find a solution to this, well, I hope this post will help you to save some time.

It’s possible that your hosting provider, for security reasons, is not allowing you to execute the wget command. If you want to use the wget (or GET) command, you can do two things:

a) send an email to your hosting provider’s support department. Or

b) you can try using the following command:

php -q /path/to/script.php

The above example worked for me nicely. However, if it still doesn’t work for you, then contact your hosting provider; maybe there are other things that they need to take care of (or fix) first before you can work with cron jobs.

Cheers!


Actions

Informations

11 responses to “/usr/bin/wget: Permission denied”

13 08 2006
Jim (12:52:39) :

Thanks, big help :)

13 08 2006
Juan Wong (12:56:06) :

Glad to be of assistance ;)

7 10 2006
Richard (20:15:04) :

Thanks :)

27 04 2007
Jose (18:54:45) :

thanks, it worked for me too

7 09 2007
anata (22:05:38) :

Thanks .

5 01 2008
vefa (14:45:03) :

thaks

11 02 2008
Alex (15:11:25) :

Thanks, i was having problems using wget, did a search on the error I was getting and found this solution. Perfect !!

11 02 2008
Juan Wong (15:45:54) :

glad I could be of help :)

26 04 2008
Tarik (11:41:09) :

Thank you, worked great.

13 05 2008
alex (16:34:45) :

thanks, you made me stop working for hours.:)

15 07 2008
Rana Imran (23:23:14) :

it really helps we have been stucked at this point due to first experience in handling cron job i cant resolve the problem at my own thanx for helping dude. you rocks




LiveSTRONG