On Sun, May 18, 2008 at 12:32 AM, Alan McKinnon <[EMAIL PROTECTED]> wrote:
> On Saturday 17 May 2008, King Spook wrote:
>> "crontab -e" does not error out when run as root.
>> "crontab -u myuser -e", when run as root, does create a crontab,
>> which appears to be owned by root, grouped by root, and with rw
>> permissions for owner only.
>>
>> How can I fix this?
>> Thanks.
>
> I would guess that you crontab binary is not guid:
>
> [EMAIL PROTECTED] /var/spool $ ls -al `which crontab`
> -rwxr-s--x 1 root crontab 30180 2007-11-02 12:59 /usr/bin/crontab*
>
> The various permissions you list for files and dirs are correct - they
> match my system which works correctly.
>
>

So I checked mine using, and you were right in that the permissions
were different.  So then I tried to make them mirror yours using:
sudo chmod u=rwx,g=rs,o=x /usr/bin/crontab

But the permissions would up like so:
-rwxr-S--x  1 root crontab   35120 Mar  6 17:16 crontab

Now when trying "crontab -e", I get:
-bash: /usr/bin/crontab: Permission denied

I'm guessing I messed up in setting guid, since yours is lower-case
's', and mine's showing upper?
-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to