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.

wget cron does not work as username

Discussion in 'General Discussion' started by icandoit, Dec 2, 2015.

  1. icandoit

    icandoit Well-Known Member

    Joined:
    Dec 21, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    as cpanel user name I noticed my cron job that has wget in it does not work
    but I put the same cron in the main crontab root and it works

    Any Idea?
     
  2. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Could we get a peak at crontab -l for the user?
     
  3. icandoit

    icandoit Well-Known Member

    Joined:
    Dec 21, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Please speak English :-D
     
  4. icandoit

    icandoit Well-Known Member

    Joined:
    Dec 21, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    I did not understand do you want the contents of cron? it has never changed for the last 5 years , I was in centos 5 recently moved to centos 6 and the same cron works if I put it in main cron but not as user
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Are you using Cloud Linux with CageFS enabled? The command suggested in the previous post may help us troubleshoot the issue:

    Code:
    crontab -l
    Run this command while logged in as the account username via SSH.

    Thank you.
     
  6. icandoit

    icandoit Well-Known Member

    Joined:
    Dec 21, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    I do not use cloudlinux or the other one

    Here we go


    user@domain.com [~]# crontab -l
    SHELL="/usr/local/cpanel/bin/jailshell"
    0 13,20 * * * /bin/sh /home/user/backups/backup1.sh
    45 7 15 * * /bin/sh /home/user/backups/backup2.sh
    */4 * * * * wget -O /dev/null --no-check-certificate https://www.mydomain.com/help/crons/index.php?/Jor/Par/POP3IMAP


    Only the last cron does not work and I tried other wget they did not work either
    but I use it in main crontab as root every thing works
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Can you run the command successfully when logged in as the account username via SSH? What are the permissions and ownership values on the /usr/bin/wget file?

    Thank you.
     
  8. icandoit

    icandoit Well-Known Member

    Joined:
    Dec 21, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Hi
    Thanks for your reply. The permission is 700 and the ownership is root
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  10. icandoit

    icandoit Well-Known Member

    Joined:
    Dec 21, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Thanks such a simple issue. Resolved but what I do not understand in a brand new server and installation what possibly changed that permission to 700? I use csf and I was making some changes as suggested in csf however not sure any of the changes I made could possibly affect the wget permission .
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's possibly a default permission depending on your operating system environment and any security settings/applications (e.g. SELinux) you have configured.

    Thank you.
     
Loading...

Share This Page