Operating System - HP-UX
1748266 Members
3489 Online
108760 Solutions
New Discussion юеВ

Re: error on crontab file creation

 
SOLVED
Go to solution
Azaru
Regular Advisor

error on crontab file creation

Hi,

Please help me.
When i try to create crontab to schedule my scripts its giving error as below.

#crontab -e
crontab: can't open your crontab file

Suggestions pls.

Thanks
Azar
11 REPLIES 11
Azaru
Regular Advisor

Re: error on crontab file creation

Sorry guys,

The exact error is this. The username is added in cron.allow file.
But still its not aloowing me to create the crontab file.

#crontab -e



"/var/tmp/aaaa03971" 1 line, 26 characters
crontab: can't create your crontab file in the crontab directory.

Thanks
azar
Dennis Handly
Acclaimed Contributor
Solution

Re: error on crontab file creation

What are the permissions of /usr/bin/crontab?
Are you root when you do this?
What are the permissions of the crontab directory, /var/spool/cron/crontabs?
(I assume this over NFS?)
Jeeshan
Honored Contributor

Re: error on crontab file creation

did you check if there is cron.deny file is exist or not?

and also check the disk space in /var and /tmp
a warrior never quits
Dennis Handly
Acclaimed Contributor

Re: error on crontab file creation

>ME: (I assume this over NFS?)

I meant NOT over NFS.
Johnson Punniyalingam
Honored Contributor

Re: error on crontab file creation

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

have you also check cron.deny - file

Can please check the permissions..?

# cd /var/adm/spool/crontabs

# ll --> please check the permisions,

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Analyst
Trusted Contributor

Re: error on crontab file creation

Hi Azar,

Check for

1. cron.allow/deny entries.

2. user file in /var/spool/cron/XXX

3. crontab -e.
The tmp file will be created inside /var/tmp/XXXXXXX
4. crontab -l [username] Lists the user's crontab file.

Thanks,
Analyst.
Sagar Sirdesai
Trusted Contributor

Re: error on crontab file creation

Hi Azar

The User is not allowed to create con jobs
Please add his name to cron.allow file.
Also if the username exists in cron.deny file .
Remove the entry.

Sagar
vjta
Regular Advisor

Re: error on crontab file creation

Hi Azar

you have to check cron.allow & cron.deny files in ur systems.
Add user entry to cron.allow & remove entry (if exists) from cron.deny.

Also check the permissions of crontab.

regards
vjta
Vijeta Bhedi
Dennis Handly
Acclaimed Contributor

Re: error on crontab file creation

The permissions of crontab should be:
-r-sr-xr-x 1 root bin /usr/bin/crontab

>ahsan: did you check if there is cron.deny file is exist or not?
>Johnson: have you also check cron.deny
>Analyst: cron.allow/deny entries.
>Sagar: The User is not allowed to create cron
>vjta: you have to check cron.allow & cron.deny files

I'm not sure why you need to repeat this misinformation 5 times. A simple check shows you get this nice message:
crontab: you are not authorized to use cron. Sorry.

In this case, you need to think zebras, not horses. :-)