The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/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:
    16
    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:
    38
    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?
     
  3. capoinfra

    capoinfra Well-Known Member

    Joined:
    Oct 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    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:
    1
    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
     
Loading...

Share This Page