View previous topic :: View next topic |
Author |
Message |
CapnKirk n00b
Joined: 17 Aug 2004 Posts: 74 Location: Philadelphia, PA
|
Posted: Sat Apr 12, 2008 11:59 am Post subject: spamassassin can't find .spamassassin directory |
|
|
I just built a exim + clamav + spamassassin system.
spamassassin out of the box runs as root. Here are the errors I'm getting:
Code: |
Apr 11 20:09:18 [spamd] spamd: connection from localhost [127.0.0.1] at port 38004_
Apr 11 20:09:18 [spamd] spamd: creating default_prefs: //.spamassassin/user_prefs_
Apr 11 20:09:18 [spamd] config: cannot write to //.spamassassin/user_prefs: No such file or directory_
Apr 11 20:09:18 [spamd] spamd: failed to create readable default_prefs: //.spamassassin/user_prefs_
Apr 11 20:09:18 [spamd] spamd: checking message <000901c89c31$07945358$63b5bc88@dhidaqf> for nobody:8_
Apr 11 20:09:23 [spamd] auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /.spamassassin/auto-whitelist.lock.balrog.whi.wts.edu.10458 for /.spamassassin/auto-whitelist.lock: No such file or directory_
Apr 11 20:09:23 [spamd] spamd: clean message (0.1/5.0) for nobody:8 in 5.2 seconds, 1435 bytes._
Apr 11 20:09:23 [spamd] spamd: result: . 0 - RDNS_NONE scantime=5.2,size=1435,user=nobody,uid=8,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=38004,mid=<000901c89c31$07945358$63b5bc88@dhidaqf>,autolearn=no_
|
The problem seems to be that spamd wants to create/write to a /.spamassassin directory, not to /root/.spamassassin directory and all the ohter messages seem to be based on this problem.
I tried running spamd as another user that has a home directory. I changed /etc/conf.d/spamd options to include a '-u' parameter. This works BUT only for child processes! The first instance of spamd is still root.
Suggestions? TIA!
Kirk |
|
Back to top |
|
|
di1bert l33t
Joined: 16 May 2002 Posts: 963 Location: Oslo, Norway
|
Posted: Mon Apr 14, 2008 11:06 am Post subject: |
|
|
It's not a solution, but I really can't be bothered finding the proper solution for SA so I just create /.spamassassin and
give it permissions of nobody:root. That will solve the problem, I'm not a huge fan of SA as it always seems to turn on me.
-m |
|
Back to top |
|
|
CapnKirk n00b
Joined: 17 Aug 2004 Posts: 74 Location: Philadelphia, PA
|
Posted: Mon Apr 14, 2008 11:50 am Post subject: How to run processes under another user:group |
|
|
Thanks for your response!
Yes, just going ahead and doing this is probably the only practical solution for the interim.
However, I think I'm going to pursue this. And if I can't find a solution (even from the spamassassin forums/lists) then I'm going to file a bug against the gentoo ebuild. If there's no way to persuade spamassassin do the RightThing(tm), then the ebuild should create the /.spamassasin file and permissions while producing a warning for elog. And then complain upstream as well.
But, in general, how does one force a process to run under another user:group, when evoked from a runscript (in /etc/init.d/) even if the program itself doesn't have a command line option for this? What is best practice for gentoo?
Kirk |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|