1834768 Members
3207 Online
110070 Solutions
New Discussion

Re: Crontab error

 
SOLVED
Go to solution
anilezfa
Advisor

Crontab error

While saving crontab entry from the edit screen of crontab -e, I got the following error:
crontab: can't create your crontab file in the crontab directory.

The user exists in /var/adm/cron/cron.allow

Permission of /usr/bin/crontab:
-rwsr-xr-x 1 root bin

Permission of /var/spool/cron/crontabs:
dr-xr-xr-x 2 bin bin

Please help me ...
14 REPLIES 14
Sunil Sharma_1
Honored Contributor

Re: Crontab error

Check if user is listed in /var/adm/cron/cron.deny file

File permission is Ok

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
T G Manikandan
Honored Contributor

Re: Crontab error

This problem usually occurs if the setuid permissions are not available.
$ ls -l /usr/bin/crontab
-r-sr-xr-x 1 root bin 32768 Jun 18 2002 /usr/bin/crontab

your permissions looks ok.

Try applying the cron patch to resolve it

if you are running 11.0

http://www1.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHCO_27141
anilezfa
Advisor

Re: Crontab error

There is no /var/adm/cron/cron.deny file and I'm running 11.11
Sunil Sharma_1
Honored Contributor

Re: Crontab error

What permission cron.allow has ? it should be world readable.
Check for patch PHCO_26562

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
T G Manikandan
Honored Contributor

Re: Crontab error

Can you list the permission for /var/spool/cron .

all dir and files under this dir
anilezfa
Advisor

Re: Crontab error

Permission for cron.allow :
-rw-r--r-- 1 bin bin
Patch already there.

# ll /var/spool/cron
total 4
dr-xr-xr-x 2 bin bin 96 Nov 3 23:58 atjobs
-r--r--r-- 1 bin bin 335 Nov 14 2000 crontab.root
dr-xr-xr-x 2 bin bin 96 Nov 3 12:07 crontabs
drwxrwxrwt 2 root root 1024 Nov 4 00:05 tmp
#
Sunil Sharma_1
Honored Contributor

Re: Crontab error

Is this problem with only one user or all user ?

What permission /var/spool/cron has ?

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
T G Manikandan
Honored Contributor

Re: Crontab error

Can you try editing the crontab using root and check!
Sยภเl Kย๓คг
Respected Contributor

Re: Crontab error

can u try manually creating crontab file in the crontab directory.
regards
SK
Your imagination is the preview of your life's coming attractions
Sunil Sharma_1
Honored Contributor

Re: Crontab error

Could you check wheather cron daemon is running /usr/sbin/crom ?


Sunil

*** Dream as if you'll live forever. Live as if you'll die today ***
bhavin asokan
Honored Contributor
Solution

Re: Crontab error

hi,

see the following link.it says this problem can occure due to some enviornmental entry /path in your .profile

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=69854


regds,
T G Manikandan
Honored Contributor

Re: Crontab error

$which crontab
anilezfa
Advisor

Re: Crontab error

thanks.
Sunil Talreja
Occasional Advisor

Re: Crontab error

I had the same issue.
check you environment variables
env |grep EDITOR

My EDITOR variable was set to emacs. I changed it to vi and everything worked fine.

Thanks