The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Message Queue Problem SaTYR High Level Programming 7 07-05-2008 01:30 AM
message queue etenv High Level Programming 2 11-02-2007 05:09 AM
message queue problem ramneek IP Networking 0 09-14-2005 03:14 AM
Cron wall message problem tt155 UNIX for Advanced & Expert Users 2 07-07-2005 05:21 AM
Message Queue Problem Again.. satansfury High Level Programming 2 07-05-2005 11:52 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-15-2003
mattd
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
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?

Cheers.
  #2 (permalink)  
Old 12-16-2003
kumaran kumaran is offline
Registered User
  
 

Join Date: Dec 2003
Posts: 3
check the ownership and permission of /usr/bin/crontab. this will solve u'r problem

-kumaran
  #3 (permalink)  
Old 12-16-2003
mattd
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
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 .

Any ideas?
  #4 (permalink)  
Old 12-16-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
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 (permalink)  
Old 12-16-2003
mattd
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
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


-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$
  #6 (permalink)  
Old 12-16-2003
jsilva's Avatar
jsilva jsilva is offline
Registered User
  
 

Join Date: Apr 2003
Posts: 169
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 (permalink)  
Old 12-16-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
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.
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0