You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Armen Ayvazian <ay...@gmail.com> on 2008/05/20 00:02:38 UTC

Spamd Not Switching Users

Greetings.
I'm running spamd 3.2.4 alongside my stock Qmail installation (passing
messages over ip sockets via the qmail-queue patch) on Ubuntu 8.04.  Because
this is a site-wide config, in previous distros I'd been able to
successfully get both the "parent" spamd process and the spamd child to
switch uid/gid to the 'spamd' user.  Kicking off spamd in the same manner:
/usr/sbin/spamd -d -P -x -u spamd -m 1 -p 1783 -r /var/run/spamd/spamd.pid
-s /var/log/spamd/current -d --pidfile=/var/run/spamd.pid

I get (from ps aux):

root     23342  2.1  7.7  31240 28704 ?        Ss   14:59   0:00
/usr/sbin/spamd {snip}
spamd    23347  0.0  7.4  31240 27308 ?        S    14:59   0:00 spamd child

and from lsof -i:
spamd     23342       root    5u  IPv4  67329       TCP localhost:1783
(LISTEN)
spamd     23347      spamd    5u  IPv4  67329       TCP localhost:1783
(LISTEN)

So one's stepped down but the other has not.  In previous distros based on
SA 3.0.4 and an identical Qmail config I'd successfully managed to get both
processes to run as spamd.  Does anyone have any idea why I can't manage the
same here?

Thanks very much.
Armen

Re: Spamd Not Switching Users

Posted by Jari Fredriksson <ja...@iki.fi>.
> Greetings.
> I'm running spamd 3.2.4 alongside my stock Qmail
> installation (passing messages over ip sockets via the
> qmail-queue patch) on Ubuntu 8.04.  Because this is a
> site-wide config, in previous distros I'd been able to
> successfully get both the "parent" spamd process and the
> spamd child to switch uid/gid to the 'spamd' user. 
> Kicking off spamd in the same manner:      
> /usr/sbin/spamd -d -P -x -u spamd -m 1 -p 1783 -r
> /var/run/spamd/spamd.pid -s /var/log/spamd/current -d
> --pidfile=/var/run/spamd.pid  
> 
> I get (from ps aux):
> 
> root     23342  2.1  7.7  31240 28704 ?        Ss   14:59
> 0:00 /usr/sbin/spamd {snip} 
> spamd    23347  0.0  7.4  31240 27308 ?        S    14:59
> 0:00 spamd child 
> 
> and from lsof -i:
> spamd     23342       root    5u  IPv4  67329       TCP
> localhost:1783 (LISTEN) 
> spamd     23347      spamd    5u  IPv4  67329       TCP
> localhost:1783 (LISTEN) 
> 
> So one's stepped down but the other has not.  In previous
> distros based on SA 3.0.4 and an identical Qmail config
> I'd successfully managed to get both processes to run as
> spamd.  Does anyone have any idea why I can't manage the
> same here?    
> 
> Thanks very much.
> Armen

Seems to be same here. I run 3.2.4 with spamc/spamd as is..

It's the root process that is running as root... all childs as given the option. I guess it's normal behaviour, at least it propably has nothing to do with your qmail-queue.