Cron message queue problem


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cron message queue problem
# 1  
Old 12-15-2003
Cron message queue problem

I have a problem with running jobs out of cron on Solaris 8.

Initially when one of the users on the box (other than root) attempted to save the crontab after modification by using "crontab -e", the message "Crontab: cannot open the crontab file in the crontab directory" was given.

I then checked all the permissions on
/var/spool/cron/crontab
/usr/spool/cron/crontab
/etc/cron.d
and
checked the cron.allow and cron.deny files incase the user was in there.


Following these changes the user can now edit the cron, however this message "error in message queue open" is given and cron does not run the jobs submitted.

Any ideas on how to solve this one? and have my permission changes done anything funky? Smilie

Cheers.
mattd
# 2  
Old 12-16-2003
check the ownership and permission of /usr/bin/crontab. this will solve u'r problem

-kumaran
# 3  
Old 12-16-2003
Cheers this would have fixed the initial problem of not being able to edit the cron. However I fixed that and following these changes the user can now edit the cron.

The problem now is this message

"error in message queue open".

Which would be ok except.......... cron does not run the jobs submitted ever . Smilie

Any ideas?
mattd
# 4  
Old 12-16-2003
Re: Cron message queue problem

Quote:
Originally posted by mattd


Following these changes the user can now edit

Any ideas on how to solve this one? and have my permission changes done anything funky?
Changing permissions on OS files is the root cause of your problem. Why would you tell us that you changed the permissions, but not what those changes were?

Change all files permissions back the way Sun intended.
# 5  
Old 12-16-2003
Ok here are my permissions, I had to change them because this was the cause of the original problem (could not write to the crontab file). Also I have no idea what the original Sun settings were because I have only just inherited this box Smilie


-rwxrwxrwx 1 bwadmin bwadmin 17224 Jun 19 2003 crontab
ns-1:/usr/bin$

lrwxrwxrwx 1 root root 16 Oct 26 17:39 cron -> ../usr/sbin/cron*
drwxrwxrwx 2 root sys 512 Dec 16 10:06 cron.d/
ns-1:/etc$ pwd

drwxr-xr-x 4 root sys 512 Dec 16 12:01 cron/
ns-1:/var/spool$

drwxr-xr-x 2 root sys 512 Oct 26 17:39 atjobs/
-rw-r--r-- 1 root other 0 Dec 16 12:01 cron.deny
drwxrwxrwx 2 root sys 512 Dec 16 17:49 crontabs/
ns-1:/var/spool/cron$

total 12
-rw-r--r-- 1 root sys 190 Oct 26 17:39 adm
-r-------- 1 bwadmin bwadmin 81 Dec 16 17:49 bwadmin
-r--r--r-- 1 root root 750 Oct 26 17:39 lp
-rw-r--r-- 1 root sys 482 Dec 16 10:17 root
-rw-r--r-- 1 root sys 308 Oct 26 18:00 sys
-r--r--r-- 1 root sys 404 Oct 26 18:02 uucp
ns-1:/var/spool/cron/crontabs$
mattd
# 6  
Old 12-16-2003
Hi,

You have a lot of changed permissions... right now, if you want to solve the specific question about crontab, just change the owner of /usr/bin/crontab to root and it must be suid...

You don't need world writabble permissions on /etc/cron.d, neither on /var/spool/cron/crontabs directories... Remove write permissions to all user crontab files, crontab suid root will be able to update them...

Well, check everything you've changed and replace the original permissions... it's very important !
# 7  
Old 12-16-2003
You've got a mess here, but there may be a fairly easy way out. Make a wide window and cd to /var/sadm/install. The file called contents records the files that were installed when the os was installed. So type "grep cron contents". The lines you see should tell you what to do. For example, I get a line that says:

/usr/bin/crontab f none 4555 root bin 17224 45844 1046476302 SUNWcsu

I don't understand all of the fields, but fields 4, 5, and 6 tell me that if the crontab command had the wrong permissions, I could just do:

chown root:bin /usr/bin/crontab
chmod 4555 /usr/bin/crontab

and I'd be back in business.

I have never used it, but Sun has a program called pkgchk that can check a package. In fact, do a "man -k pkg" to see all of the pkg stuff.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX power problem cron message on screen

Hello, I keep getting this message even after i removed it from the cron enteries it was added automatically Broadcast message from root@oradb (tty) at 12:00:00 ... rc.powerfail:2::WARNING!!! The system is now operating with a power problem. This message will be walled every 12... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. Ubuntu

Message Queue in Linux

Hello How can I see the created message queues in the system? (4 Replies)
Discussion started by: xyzt
4 Replies

3. Programming

Message Queue Problem

Hi all, I need help about message queues, i have a server-client program that communicates each other via msg queue, firstly server opens its msg queue and waits for msg then client opens server msg queue and its own msg queue(for receiving msg from server,clients sends msg to server msg... (7 Replies)
Discussion started by: SaTYR
7 Replies

4. Programming

How to limit max no of message in a posix message queue

Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies

5. Programming

[C]Problem removing a message queue

Hi!! This code works if I don't remove the message queue. In A.c I create 3 processes that send a message in a message queue. in B.c other 3 processes receive 1 message for each (the messages sent from A), change the value of "dato" and put again the message in the queue. The processes in A.c... (0 Replies)
Discussion started by: Sentinella
0 Replies

6. Programming

message queue

Hello, i need to write a message queue "chat server", that should work only localy. Can anyone please help me with some ideas and peshaps code. I'm studying the UNIX IPC mechanisms right now. So far, i understand how it works but i still cannot get an idea how to write a chat programm... ... (2 Replies)
Discussion started by: etenv
2 Replies

7. Programming

Message Queue with fork() help

hi all... ive been trying this program where i spawn 4 threads... and i am trying to use message queue to send msgs from 3 of the threads to the parent thread... but it doent seem to be working... ive almost pulled out my hair tryin to fix the prob :confused: another wierd thing... (1 Reply)
Discussion started by: strider
1 Replies

8. IP Networking

message queue problem

I am sending and retriving the message to the queue the problem is after retrieving the message can i see what is there in my message queue. (actually in my application i am encountring some garbage value) so i want to retieve this garbage value and also want to know its size how... (0 Replies)
Discussion started by: ramneek
0 Replies

9. UNIX for Advanced & Expert Users

Cron wall message problem

Operating system sun solaris 5.8 My problem is : crontab -e 15 16 * * * /bckscripts/oo vi /bcscripts/oo = wall " stop backup " the system at the 16:15 all day time doesn't display message " stop backup " What's the problem ??? i'am root user the follow is the root dir... (2 Replies)
Discussion started by: tt155
2 Replies

10. Programming

Message Queue Problem Again..

Is there any way one can delete , say , a particular message from a message queue on system V? (2 Replies)
Discussion started by: satansfury
2 Replies
Login or Register to Ask a Question