wget cron does not work as username

icandoit

Well-Known Member
Dec 21, 2010
86
3
58
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?
 

icandoit

Well-Known Member
Dec 21, 2010
86
3
58
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

icandoit

Well-Known Member
Dec 21, 2010
86
3
58
I do not use cloudlinux or the other one

Here we go


[email protected] [~]# 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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

icandoit

Well-Known Member
Dec 21, 2010
86
3
58
Hi
Thanks for your reply. The permission is 700 and the ownership is root
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
The default permissions for /usr/bin/wget are 0755. Does updating the permissions on this file to 0755 make a difference?

Thank you.
 

icandoit

Well-Known Member
Dec 21, 2010
86
3
58
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 .
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Resolved but what I do not understand in a brand new server and installation what possibly changed that permission to 700?
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.