/bin/sh: /usr/bin/wget: Permission denied

capoinfra

Well-Known Member
Oct 25, 2007
119
1
66
Uruguay
Hello,

I can not execute a cron with wget over a php file...

The /usr/bin/wget binary has 755 permissions.

But, I created a cron job from cpanel, for example: wget -q -O /dev/null http://www.mydomain.com/empty.php and receive e-mails with the message:

/bin/sh: /usr/bin/wget: Permission denied

The script is empty, just for test this problem.

I don't understand why can't run wget with cron.

Any Idea?

Thanks in advance!
 

capoinfra

Well-Known Member
Oct 25, 2007
119
1
66
Uruguay
brianoz,

Thank you for your interest.

I request cPanel official support and the problem is solved now.

Was caused for insufficient permissions over wget binary.

Thank you!
 

tukaramg

Member
Sep 22, 2005
15
0
151
To get it resolved you need to follow the given steps :

Login to server with root

check the path of wget with command

#which wget

#chown root.get-users /usr/bin/wget

#usermod -g get-users username

#chmod 750 /usr/bin/wget

you can verify it with

#grep username /etc/group