Re: Build Debian bin pkg from Ubunt scr pkg

Markus Hoenicka <[email protected]> Wed, 30 Sep 2009 10:51:07 +0200
Newsgroups gmane.text.refdb.general
Message-ID <[email protected]>
Quoting Stefan Schlee <[email protected]>:

>>
>> I don't like that.  Unless there are very good reasons, a daemon
>> should have non-root privileges.  RefDB works fine as an ordinary
>> user.
>
> The manual says: "The interactive script refdb-init must be run with  
> root permission as it tries to fiddle with a couple of files that a  
> regular user should not have write permission for."  So starting  
> "refdb-init" as root seems to be necessary.  This does not mean that  
> the "refdb" server runs as root.  As I understand it, the command  
> "/usr/sbin/refdbd" (called as $MYREFDBD) is merely used to set up  
> the "refdb" database.  The refdbd server is started after that by  
> the command
>
> $MYREFDBCTL start || endScript "Could not start refdbd" "failed"
>
> which starts it with the "refdb" user (see the variable DAEMONUSER  
> in the "/etc/init.d/refdb" script).
>

Basically, refdbd runs just fine with regular user permissions as long  
as you set up all file permissions appropriately. The manual has  
generic installation instructions which make sure that you arrive at a  
working installation. If you have extra security concerns (like Debian  
has, for good reasons), then you'll have to adapt these instructions  
accordingly. If you run refdbd using a different user account, it  
should be sufficient to make all files that refdbd accesses (mainly  
log and PID files) writable for that user. It is very well possible  
that refdb-init requires additional tweaks to make it suitable for  
non-root accounts. I've simply never tried that. I'll try this as soon  
as time permits.

regards,
Markus

-- 
Markus Hoenicka
[email protected]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf