The following warnings occurred:
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 613 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 654 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 701 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 749 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 801 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once




Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User Cron jobs not working in cpanel
#1
Lightbulb 
Hi

I have a cpanel server and the cpanel cron jobs are not at all running. I can see them when I use command " crontab -l -u chris "  but in the cron log , I am not seeing any thing for this running. 

Do any of you have any idea in this case ? The only recent change made to the server which was near to 2 week before is server hardening. 

Dodgy
Reply
#2
Hi

Recently  similar situation came in front of from a customer and the fix which worked for me was the below

1 st Fix
=======

Check and confirm if you have enabled RESTRICT_SYSLOG and if enabled try disabling the same by changing the values  to 1 0r 2  

Reference Link : https://forums.cpanel.net/threads/user-c...ng.567221/

2nd Fix
=======

This fix has helped me a more than twice now . It seems some servers is having issues with LES and you might need to change the permissions of atleast 3 binaries in my expereince

From the installation log, I can see LES is changing permission of the binaries listed below to 700

===================
server les(5972): {sec.bin} chmod 700 /bin/dmesg
server les(5972): {sec.bin} chmod 700 /bin/mount
server les(5972): {sec.bin} chmod 700 /bin/rpm
server les(5972): {sec.bin} chmod 700 /usr/bin/write
server les(5972): {sec.bin} chmod 700 /bin/logger
server les(5972): {sec.bin} chmod 700 /usr/bin/ipcrm
server les(5972): {sec.bin} chmod 700 /usr/bin/ipcs
server les(5972): {sec.bin} chmod 700 /usr/bin/free
server les(5972): {sec.bin} chmod 700 /usr/bin/locate
server les(5972): {sec.bin} chmod 700 /usr/bin/wall
server les(5972): {sec.bin} chmod 700 /sbin/arp
server les(5972): {sec.bin} chmod 700 /sbin/ifconfig
server les(5972): {sec.bin} chmod 700 /usr/sbin/repquota
server les(5972): {sec.bin} chmod 700 /usr/sbin/tcpdump
server les(5972): {sec.bin} chmod 700 /usr/bin/wget
server les(5972): {sec.bin} chmod 700 /usr/bin/lynx
server les(5972): {sec.bin} chmod 700 /usr/bin/cc
server les(5972): {sec.bin} chmod 700 /usr/bin/gcc
server les(5972): {sec.bin} chmod 700 /usr/bin/logger
server les(5972): {sec.bin} chmod 700 /usr/bin/who
server les(5972): {sec.bin} chmod 700 /usr/bin/w
server les(5972): {glob} sec.bin enabled
==================

Amoung those I only changed the below three which the cron jobs might be mostly depended.

/bin/rpm
/usr/bin/wget
/usr/bin/lynx

Changing the above binaries to 755 permission fixed my issues and cron jobs for users started showing up in logs as well.

https://www.rfxn.com/projects/linux-envi...-security/
Reference Link : http://stackoverflow.com/questions/33420...8#33704328

#3 rd fix possibility

If you have cloudlinux / CageFS installted, then you might need to reinstate the Cagefs and see if that fixes or disabling the cagefs fully as well.

If any pf these 3 is not helping, then it needs more deep investigation.

Please check the above details.
Reply
#3
You are a saviour !!!.. Yes My issue fixed after fixing the permission and yes there was LES installed during Hardening.

Once again Thanks a lot for this man !!! I owe you a beer ...
Reply
#4
Glad to hear that Techllinux reply helped you Chris. Me also noted down the fix for future reference

Thank you Techyllinux
Reply
#5
Hi

Adiditonaly to CSF RESTRICT_SYSLOG, once changed the option, you may have to change the permissio to 666 for /dev/log.

Reply from one of the cpanel techs
===========================
Non-default Perms: /dev/log [mode 0660] (default 0666) - CSF RESTRICT_SYSLOG can change this. Non-root users may not be able to log to syslog, including user cron jobs to /var/log/cron.

This may possibly be the cause of the crons to fail to properly load. I changed the permissions for the /dev/log file to 666 now so lets check to see if crons now run

[01:40:13 server101 root@7878233 /dev]cPs# stat log
File: `log'
Size: 0 Blocks: 0 IO Block: 4096 socket
Device: 5h/5d Inode: 9592 Links: 1
Access: (0660/srw-rw----) Uid: ( 0/ root) Gid: ( 494/mysyslog)
Access: 2016-11-03 01:59:01.741000037 -0400
Modify: 2016-11-02 01:58:43.860755866 -0400
Change: 2016-11-02 01:58:46.211755864 -0400
[01:40:15 server101 root@7878233 /dev]cPs# chmod 666 log
[01:40:23 server101 root@7878233 /dev]cPs#
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)