Gentoo Archives: gentoo-user

From: King Spook <kngspook@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] non-root crontab failure (permissions issue?)
Date: Sun, 18 May 2008 12:28:44
Message-Id: 77e4079b0805180528r786ca450l7d6c32b9c71f2c67@mail.gmail.com
In Reply to: Re: [gentoo-user] non-root crontab failure (permissions issue?) by Alan McKinnon
1 On Sun, May 18, 2008 at 12:32 AM, Alan McKinnon <alan.mckinnon@×××××.com> wrote:
2 > On Saturday 17 May 2008, King Spook wrote:
3 >> "crontab -e" does not error out when run as root.
4 >> "crontab -u myuser -e", when run as root, does create a crontab,
5 >> which appears to be owned by root, grouped by root, and with rw
6 >> permissions for owner only.
7 >>
8 >> How can I fix this?
9 >> Thanks.
10 >
11 > I would guess that you crontab binary is not guid:
12 >
13 > alan@nazgul /var/spool $ ls -al `which crontab`
14 > -rwxr-s--x 1 root crontab 30180 2007-11-02 12:59 /usr/bin/crontab*
15 >
16 > The various permissions you list for files and dirs are correct - they
17 > match my system which works correctly.
18 >
19 >
20
21 So I checked mine using, and you were right in that the permissions
22 were different. So then I tried to make them mirror yours using:
23 sudo chmod u=rwx,g=rs,o=x /usr/bin/crontab
24
25 But the permissions would up like so:
26 -rwxr-S--x 1 root crontab 35120 Mar 6 17:16 crontab
27
28 Now when trying "crontab -e", I get:
29 -bash: /usr/bin/crontab: Permission denied
30
31 I'm guessing I messed up in setting guid, since yours is lower-case
32 's', and mine's showing upper?
33 --
34 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] non-root crontab failure (permissions issue?) Alan McKinnon <alan.mckinnon@×××××.com>