1844005 Members
4185 Online
110226 Solutions
New Discussion

Cron Error..

 
SOLVED
Go to solution
dhanish
Regular Advisor

Cron Error..

Hi,
I am facing a probelm in cron on HP .Whenever i create a cron job using crontab -e ..and whne i try to save that file it gives the following error

crontab: can't create your crontab file in the crontab directory.

This is happening for all the users except root.I have entries of the all tyhe users in cron.alow file.I tried removing the old file using crontab -r but still the problem persists.Any clues whats happening here ...

thnks
Never Say Die
9 REPLIES 9
Clemens van Everdingen
Honored Contributor

Re: Cron Error..

Hi,

Is the directory /var/spool/cron/crontabs existing on your system ?
And does it have the permissions
dr-xr-xr-x 2 bin bin ?

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Deepak Extross
Honored Contributor

Re: Cron Error..

1. Do the files /usr/lib/cron/cron.allow and /usr/lib/cron/cron.deny exist? If neither of these exist, only 'root' can use crontab.

2. Do the users have permissions in /var/spool/cron/crontabs to create their crontab files?
dhanish
Regular Advisor

Re: Cron Error..

dr-xr-xr-x 2 bin bin 1024 Apr 15 14:08 crontabs
Yes i have the crontab dir with the above permission and i have /usr/lib/cron/cron.allow and /var/adm/cron/cron.allow files with ths user entry in that file.I do not have cron.deny. file.
Never Say Die
Deepak Extross
Honored Contributor

Re: Cron Error..

If there are any user files in the /var/spool/cron/crontabs directory, they should be owned by the users themselves, not by root. What does "ll /var/spool/cron/crontabs" show?
Trond Haugen
Honored Contributor
Solution

Re: Cron Error..

Also check if crontab is suid and owned by root:
-r-sr-xr-x 1 root bin 32768 Feb 9 2001 /usr/bin/crontab


Regards,
Trond
Regards,
Trond Haugen
LinkedIn
dhanish
Regular Advisor

Re: Cron Error..

rwSrw-rw- 1 root bin 32768 Feb 9 2001 crontab


this is my crontab detail
Never Say Die
V. V. Ravi Kumar_1
Respected Contributor

Re: Cron Error..

hi

is cron.allow is having the following permissions

-r--r--r-- 1 bin bin

regds
ravi
Never Say No
Deepak Extross
Honored Contributor

Re: Cron Error..

From the error message, it sounds like you dont have write permissions on the /var/spool/cron/crontabs/ file.
dhanish
Regular Advisor

Re: Cron Error..

Thnks Trond ..i was having problem in my set uid permissions.

thnks
Never Say Die