[arch-dev-public] [signoff] pkgstats 2.1-1
Dan McGee
dpmcgee at gmail.com
Mon Sep 13 09:53:14 EDT 2010
On Mon, Sep 13, 2010 at 8:44 AM, Thomas Bächler <thomas at archlinux.org> wrote:
> Am 13.09.2010 13:22, schrieb Dieter Plaetinck:
>> On Mon, 13 Sep 2010 13:05:26 +0200
>> Pierre Schmitz <pierre at archlinux.de> wrote:
>>
>>> * the cron is run as nobody and not root (anyone knows how to do this
>>> without sudo? no, su does not work it seems)
>>
>> You can setuid the file and give it a specific owner, it will be run as
>> that user. If that's what you're asking.
>
> That is so not true. setuid is much more obscure and confusing than that
> - and most importantly, does not work on shell scripts.
Go with something a bit more powerful than shell scripting?
http://perldoc.perl.org/POSIX.html
You can call POSIX::setuid() and setgid() to drop permissions.
-Dan
More information about the arch-dev-public
mailing list