[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't get the set-user-id bit to work
From: |
Paul Jarc |
Subject: |
Re: Can't get the set-user-id bit to work |
Date: |
Tue, 27 Dec 2005 15:02:18 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
Sebastian Tennant <sebyte@smolny.plus.com> wrote:
> I have a 3-line script; foo:
The setuid bit works only for binaries, not scripts. This is a
limitation of the kernel, necessary for security.
> A cron.daily script handles mandb. I elected to install it with the
> set-user-id bit set, as you can see:
Is it meant to be installed that way? If not, you probably shouldn't
do that. It might break something, or introduce a security risk.
> it certianly shouldn't have any trouble creating it in /tmp:
>
> drwxrwxr-x 13 root root 4096 Dec 27 16:50 /tmp
With those permissions, only the root user and root group can create
files in /tmp. To allow all users to create files there, make it
world-writable and sticky:
# chmod 1777 /tmp
# ls -ld /tmp
drwxrwxrwt 13 root root 4096 Dec 27 16:50 /tmp
paul