Results 1 to 25 of 25
  1. #1
    Join Date
    Feb 2004
    Posts
    473

    Issue with cron - GET command not found

    after domain moved to new server we receive this email alert when cron job run (set under cpanel)

    /bin/sh: GET: command not found

    ?

    Tx
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  2. #2
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,446
    what is the cron job about and can you paste the script thats run as cron ?
    Sam
    Supportlobby.com - Expertise in Windows/Linux server support, IaaS and PaaS Management
    Spiralbean.com - Custom Software Development
    Email: exec @ activelobby.net | Skype: unni_active

  3. #3
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,686
    Make sure the wget binary is installed and you have access to it as that user. That's not going to solve everything, but it could possibly resolve this

    You could also change the command to something like wget "http://domain/file.php", or curl -k http://domain/file.php

    GET is typically a system alias, it's entirely possible that the 'new server' you moved to doesn't support it, as more and more updated systems are killing aliases like this due to abuse.
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

  4. #4
    Join Date
    Feb 2004
    Posts
    473
    Quote Originally Posted by linux-tech View Post
    Make sure the wget binary is installed and you have access to it as that user. That's not going to solve everything, but it could possibly resolve this

    You could also change the command to something like wget "http://domain/file.php", or curl -k http://domain/file.php

    GET is typically a system alias, it's entirely possible that the 'new server' you moved to doesn't support it, as more and more updated systems are killing aliases like this due to abuse.

    wget is installed, I can use it from ssh

    How can I set alias of wget to get ?

    Thanks
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  5. #5
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,686
    Your best bet is to just change the cron as suggested. GET shouldn't be used, rather wget, lynx, curl, as suggested. GET is unsupported on later systems for security reasons, and that, most likely is just what happened here.
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

  6. #6
    Join Date
    Feb 2004
    Posts
    473
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  7. #7
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    why do people use GET? Why don't you just use curl for remote files and cat for local files?

    ln -s /usr/bin/curl /usr/bin/GET

  8. #8
    Join Date
    Feb 2004
    Posts
    473
    Quote Originally Posted by ub3r View Post
    why do people use GET? Why don't you just use curl for remote files and cat for local files?

    ln -s /usr/bin/curl /usr/bin/GET
    more customer on this server have setting cron with GET..

    with the ln they can use GET ?

    tx
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  9. #9
    Join Date
    Feb 2004
    Posts
    473
    I have try

    ln -s /usr/bin/curl /usr/bin/GET

    and after I have create alias

    alias GET='/usr/bin/GET'

    seems work
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  10. #10
    Join Date
    Feb 2004
    Posts
    473
    but this works as GET ?

    > devnull not work, how to set this with alias / ln

    thx

    ps. I have check on the old server and have found GET under /usr/bin/
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  11. #11
    Join Date
    Aug 2007
    Location
    Greece
    Posts
    390
    If you need the > /dev/null to work you would have to link GET with wget and not curl.
    NOT a webhost!helping here just for the fun of it!
    G(r)eek inside.

  12. #12
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Quote Originally Posted by tix3 View Post
    If you need the > /dev/null to work you would have to link GET with wget and not curl.
    you're wrong. just use the -s flag.

    [email protected][~] $ curl -s google.com > /dev/null
    [email protected][~] $

  13. #13
    Join Date
    Aug 2007
    Location
    Greece
    Posts
    390
    You are right ub3r.He would have to update his alias to i think.
    NOT a webhost!helping here just for the fun of it!
    G(r)eek inside.

  14. #14
    Join Date
    Feb 2004
    Posts
    473
    uhm :'(

    I have tried

    ln -s /usr/bin/wget /usr/bin/GET

    but receive permission denied

    /bin/sh: /usr/bin/GET: Permission denied
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  15. #15
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    you have to be root to run that.

  16. #16
    Join Date
    Feb 2004
    Posts
    473
    Quote Originally Posted by ub3r View Post
    you have to be root to run that.
    :/

    but cron is set by user directly under your cpanel

    so get / wget must can be run from user

    how to this ?

    tx
    Last edited by webstyler; 04-13-2008 at 06:48 PM.
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  17. #17
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Just because a file has 755/root:root permissions doesn't mean it will be run by root. It will be executed on the user's accesslevel. YOu just need to be root in order to edit files in /usr/bin/

  18. #18
    Join Date
    Feb 2004
    Posts
    473
    Quote Originally Posted by ub3r View Post
    Just because a file has 755/root:root permissions doesn't mean it will be run by root. It will be executed on the user's accesslevel. YOu just need to be root in order to edit files in /usr/bin/
    uhm.. but so, why receive

    /bin/sh: /usr/bin/GET: Permission denied

    ?

    Tx
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  19. #19
    Join Date
    Feb 2004
    Posts
    473
    update

    I have chmod 755 and seems GET run

    BUT

    He download php file.. I need to run it not downloaded

    tx
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  20. #20
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    What does your crontab line look like? Also, do you know anything about linux, or are you just using an unmanaged service because you can't afford a managed service?

  21. #21
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Also, i'd like to note that this is another example for my argument that web designers should never attempt server administration.

  22. #22
    Join Date
    Feb 2004
    Posts
    473
    Quote Originally Posted by ub3r View Post
    What does your crontab line look like?
    I use it for lunch php script

    Quote Originally Posted by ub3r View Post
    Also, do you know anything about linux, or are you just using an unmanaged service because you can't afford a managed service?
    I'm really newbie on linux
    But I haven't ask to come a guru..
    I have only ask how to make GET run on my server
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  23. #23
    Join Date
    Feb 2004
    Posts
    473
    Quote Originally Posted by ub3r View Post
    Also, i'd like to note that this is another example for my argument that web designers should never attempt server administration.
    I don't understand this post and don't understand how this can help anyone.

    I think that forum is also for learning basic operation and this is really basic...
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

  24. #24
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    I use it for lunch php script
    Dude, alright. You should just be running this:

    curl -s http://yourdomain.com/somefile.php > /dev/null

    If you run it as a normal user, it won't be executed with root-level permissions. It doesn't matter what the permissions of the /usr/bin/curl file are, if you run it as a user, it'll be executed that way. Just because you see some html output doesn't mean it isn't being executed. If you see php code, which I doubt you even know how to recognize, then that's a reason to be concerned. However, You should never have even started using the "GET" command because it's only something that idiots who don't have any first hand knowledge of linux type when they are put into an ssh console. You will use curl, and you will stop using GET, and you'll like it.


    I don't understand this post and don't understand how this can help anyone.

    I think that forum is also for learning basic operation and this is really basic...
    It's helpful to society because there aren't any web designers who know what they're doing when it comes to programming, or administrating a server. If more people knew this, we wouldn't be wasting our time giving you simplistic explanations the first time, and would be able to give you a long, drawn out, pointless-for-the-rest-of-us explanations instead. Furthermore, you're contributing to the downfall of the internet by attempting to admin this server by yourself, because a good portion of what's on your server is probably going to remain unupdated in the years to come, and you're probably going to get hacked, and your server is going to end up being used as part of a botnet which some teenagers will use to attack the rest of us. So thanks a lot, webstyler.

  25. #25
    Join Date
    Feb 2004
    Posts
    473
    tx x suggest

    I don't lost time to answer to second quote.. this is your idea.. not mine.. I'm not a web designer, we have more than 1 server and have sysadmin that take server secure BUT we would like to know more simple and basic operation and for this reason we work for basic operation on 1 server where there are few little customer.. I don't must this tell you, but I think this it's helpful to society..
    Last edited by webstyler; 04-14-2008 at 05:30 PM.
    We need server tuning for improve mass mailing list. Please send PM if have knowledge
    TX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •