Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'General Discussion' started by capoinfra, Sep 29, 2010.

  1. capoinfra

    capoinfra Well-Known Member

    Joined:
    Oct 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    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!
     
  2. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    168
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    What user is the script runing as?
    Are you running SELinux?
    What are the perms on /usr/sbin and /usr, and ownerships?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. capoinfra

    capoinfra Well-Known Member

    Joined:
    Oct 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    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!
     
  4. tukaramg

    tukaramg Member

    Joined:
    Sep 22, 2005
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice