How can I restore Visual CRON ,manager to WebMin

3 posts / 0 new
Last post
#1 Wed, 09/30/2015 - 05:46
monkeymagix

How can I restore Visual CRON ,manager to WebMin

Hi

Since a shockwave attack the other year I have lost my visual CRON job manager tool in WebMin.

When I click on the menu option "System > Scheduled Cron Jobs" I just get the following message

"The command crontab for managing user Cron configurations was not found. Maybe Cron is not installed on this system?"

However I know that CRON JOBS are running because

a) I have a CRON job that sends out bulk emails every morning and they are still being sent b) I have CRON jobs for a number of plugins to fire them and they still work e.g building SiteMaps, Importing Feed Content and running TweetBOT jobs.

So I am guessing it's a permission issue or something has been changed that is blocking WebMin from loading them up in GUI fashion.

When I login to a console and run

crobtab -e

I get

crobtab: command not found

If I run any of these

crontab -u user1 -l

crontab -u root -l

I get

/usr/bin/crontab: Permission denied

When I run

ls /var/spool/cron/crontabs

I can see a list of users

user1 user2 user3 root

When I run this

sudo ls -root /var/spool/cron/crontabs

I get back some information

total 16 -rw------- 1 user1 201 Oct 14 2011 user1 -rw------- 1 user2 1668 Jan 28 2014 user2 -rw------- 1 user3 1953 Oct 5 2014 user3 -rw------- 1 root 1592 Oct 7 2014 root

If I run this

ls -user1 /usr/bin/crontab

I get back

9240919 32 ---------- 1 root 32 Jun 1 07:03 /usr/bin/crontab

So the cron jobs are obviously there and assigned to users but I am guessing the permissions are incorrect for some reason which is why it doesn't run in WebMin or load up in the console.

What commands should I run to restore the visual cron tab in WebMin or view the jobs in the console?

I have seen this article > http://serverfault.com/questions/78159/what-could-cause-permission-denie...

But I don't want to just start running commands willy nilly as I am not exactly a LINUX expert and don't want to make things worse.

Thanks

Rob

Wed, 09/30/2015 - 10:24
andreychek

Howdy,

It looks like the "crontab" command doesn't have any permissions to run.

That is preventing it from working, and also preventing the Webmin cron module from working properly.

Try running this command to fix that:

chmod 2755 /usr/bin/crontab

After that, does the crontab command work as expected?

-Eric

Thu, 10/01/2015 - 04:24
monkeymagix

Hi

Just want to say thank you for that!

It is now working in that I can now see the GUI CronTab in WebMin.

This has been broken for months and whilst I am happy to admit I am a Windows person struggling along when it comes to LINUX learning from my own mistakes and Google etc, there are supposed to be people in this company who know LAMP and they have been no help whatsoever.

I thought it might be permissions as you can see from my question, I just didn't know what to set them to resolve it.

Does 2755 equate to 755, as I've never seen a 4 digit code on any of my FTP folders?

Also is it safe to set this level for the CronTab?

Also I don't know if this is relevant or not but when I run

crontab -e

in the console I still get

Command not found

But if I run

Crontab -u username -l it lists a load of cronjobs in the console.

Is this something to worry about or not?

And thank you for taking time to help me!

Rob

Topic locked