[plug] Crontab Permissions

Timothy White weirdit at gmail.com
Fri Aug 19 10:05:47 WST 2005


On 8/19/05, Russell Steicke <r.steicke at bom.gov.au> wrote:
> On Fri, Aug 19, 2005 at 09:30:44AM +0800, Timothy White wrote:
> ...
> > p.s. for reference i ran the same commands on linjeni. The only
> > difference I can see is which group the created crontab is in. crontab
> > on this box, root on the other. But that doesn't explain why I can't
> > create a crontab at all.
> > tim at linjeni:~$ ls -l /var/spool/cron/
> > total 12
> > drwxrwx--T  2 daemon daemon  4096 2005-04-20 03:54 atjobs
> > drwxrwx--T  2 daemon daemon  4096 2005-02-18 18:37 atspool
> > drwx-wx--T  2 root   crontab 4096 2005-07-18 16:25 crontabs
> > tim at linjeni:~$ ls -l /var/spool/cron/crontabs/
> > ls: /var/spool/cron/crontabs/: Permission denied
> > tim at linjeni:~$ sudo ls -l /var/spool/cron/crontabs/
> > Password:
> > total 4
> > -rw-------  1 tim crontab 307 2005-07-18 16:25 tim
> 
> How about /usr/bin/crontab?
> 
>   $ ls -l /usr/bin/crontab
>   -rwxr-sr-x  1 root crontab 26872 2004-07-29 04:44 /usr/bin/crontab*
>   $
> 
> Ensure yours is sgid crontab.

Problem found. I new it had sgid already. The problem was the group!!
tim at camiroi:~$ vdir /usr/bin/crontab
-rwxr-sr-x  1 root root 26872 2005-05-20 17:28 /usr/bin/crontab

tim at linjeni:~$ vdir /usr/bin/crontab
-rwxr-sr-x  1 root crontab 30312 2004-10-30 00:06 /usr/bin/crontab

Thanks all

Tim



More information about the plug mailing list