Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Ness on November 03, 2005, 12:55:31 AM

Title: Something broken in crontabs?
Post by: Ness on November 03, 2005, 12:55:31 AM
Hi

I'm getting email messages every hour:

========================================

Subject:Cron <root@sago> run-parts /etc/cron.hourly

/bin/bash: run-parts: command not found

========================================

Server seems to be running ok, but this message is worrying me.

I can't see a cron.hourly directory!

Can anyone help me to resolve this problem?

Thanks

Chris
Title: Something broken in crontabs?
Post by: Ness on December 01, 2005, 10:29:57 AM
Anyone?

Chris
Title: Something broken in crontabs?
Post by: Curly on December 01, 2005, 06:23:13 PM
On my SME-server (6.01), run-parts is in /usr/bin. It's a script that executes other scripts in a directory.

You should check wether /usr/bin/run-parts exists, and if so it has the right permissions:

-rwxr-xr-x 1 root root /usr/bin/run-parts

The cron.hourly directory is in /etc . If that one is missing, just create it.

drwxr-xr-x 2 root root /etc/cron.hourly
Title: Something broken in crontabs?
Post by: Ness on December 01, 2005, 07:21:40 PM
Thanks for taking the time to look this up for me Curly.

On my server, there is no run-parts in /usr/bin. Indeed there are no files called r* in this direcory at all!

This is a worry as in a colleague's server (same software there are some 35 files or folders in the /usr/bin directory that commence with the letter "r".

Oh .... my ...

What's happened here and how can I get to "normality"?

Chris
Title: Something broken in crontabs?
Post by: Curly on December 01, 2005, 08:25:11 PM
>> On my server, there is no run-parts in /usr/bin.
>> Indeed there are no files called r* in this
>> direcory at all!

Well, you've found the origin of the errors. This is the point where professionals call "restore from backup", that would be the best solution. If you don't have a backup, perhaps you could get one from someone else. Just restore this directory and check for other errors.

If you're missing files in this directory, you might be missing more, check /var/log/messages for more errors. A backup to desktop, re-install and restore should fix everything. (I'm not 100% sure that you won't loose something, but you should be able to find more in these forums about re-installing) A re-install without backup will erase everything !

There's still the question how these files became missing. You need root access to erase run-parts, something strange has happend here.
Title: Something broken in crontabs?
Post by: Ness on December 01, 2005, 09:31:37 PM
Well, call me an old professional if you will... I just did a full restore from tape (I backed up new work locally ;-)) and hey presto run-parts is back where it should be.

I was wrong about r* being missing. Finger trouble at the time!

Let's see now how the system runs for 24 hours eh?

Thanks for the advice Curly!

All the best

Chris