Operating System - HP-UX
1753506 Members
5112 Online
108794 Solutions
New Discussion юеВ

unable to save the file in crontab

 
rajesh73
Super Advisor

unable to save the file in crontab

i am unable to save the file is crontab kindly find the error messages.


Error

"/var/tmp/aaaa07754" 1 line, 2 characters
crontab: can't create your crontab file in the crontab directory.
6 REPLIES 6
Shibin_2
Honored Contributor

Re: unable to save the file in crontab

Do you have permission to execute crontab ?

Alternate option.

1. Put the schedule details in a file as like you enter using crontab -e

2. become the user in which you want to execute the cron job. ( su - )

3. crontab .
Regards
Shibin
Matti_Kurkela
Honored Contributor

Re: unable to save the file in crontab

Verify the permissions of the crontab command:

$ ll /usr/bin/crontab
-r-sr-xr-x 1 root bin 40960 Aug 14 2007 /usr/bin/crontab

The crontab command requires "setuid root" permissions, or else it won't be able to write to directory /var/spool/cron/crontabs. Regular users should not be able to write to that directory using normal tools; only the crontab command should be used to access that directory.

The "setuid root" permission may also be required for notifying the running cron daemon that the crontabs have been modified.

MK
MK
rajesh73
Super Advisor

Re: unable to save the file in crontab

kindly find the file permision.pls advice how to setuid permission

$cd /usr/bin
$ls -ltr crontab
-rwxr-xr-x 1 root bin 28672 Jul 17 2002 crontab
Patrick Wallek
Honored Contributor

Re: unable to save the file in crontab

$cd /usr/bin
$ls -ltr crontab
-rwxr-xr-x 1 root bin 28672 Jul 17 2002 crontab

That is incorrect. It needs to be fixed!

Do the following:

# chmod 4555 /usr/bin/crontab

Now your crontab commands should work normally and be able to save files as appropriate.
Shibin_2
Honored Contributor

Re: unable to save the file in crontab

use the command.

# chmod 4555 /usr/bin/crontab
Regards
Shibin
rajesh73
Super Advisor

Re: unable to save the file in crontab

Hi thanks now it is working