Rosenstrauch, David wrote:
I've got a couple of pkgbuild's I've done for some daemon apps, which I'd like to
fix and update. One of the things I'd like to fix is to have these daemons run as
a non-root user. (They don't need the privileges, as they either just read/write
to/from the file system or listen on a socket port >1024.) But since these
daemons get launched from rc.conf, they'll wind up running as root user unless I
find a way to avoid that.
I've not yet been able to come up with a clean way to do this, though. As I mentioned, these are
perl scripts, and I tried doing a setuid bit on the perl script (along with "chown
nobody.nobody"), but the daemon still gets launched as root. (Any idea why? Does the Arch
packge of perl not support the setuid bit on scripts?) I tried doing those same changes on the
/etc/rc.d bash script that launches perl and the script, but again no dice. Only other suggestion
I've heard is to use "su -c" to launch the daemon, but that seems pretty hackish to me.
I don't think Arch has anything like "start-stop-daemon --chuid" like Debian
does. But still, I was hoping someone might be able to offer up a reasonably clean way
of doing this on Arch. Any suggestions along those lines would be appreciated.
BTW, if anyone would like to see the pkgbuild I'm having trouble with, it's
"ddclient" in the AUR. (Be warned: I might have a small (easy to fix) bug in
the PKGBUILD currently.)
Thanks,
DR
Try this link:
http://www.unix.org.ua/orelly/perl/sysadmin/ch01_06.htm
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch