You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Kaushal Shriyan <ka...@gmail.com> on 2006/07/04 18:18:56 UTC

Permission Denied

Hi ALL

I get this in the Sendmail Maillog

Jul  4 21:25:02 bdcworld spamd[10573]: spamd: processing message
<6b...@mail.gmail.com> for
root:99
Jul  4 21:25:02 bdcworld spamd[10573]: mkdir /root/.spamassassin:
Permission denied at
/usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1486
Jul  4 21:25:02 bdcworld spamd[10573]: locker: safe_lock: cannot
create tmp lockfile
/root/.spamassassin/auto-whitelist.lock.bdcworld.com.10573 for
/root/.spamassassin/auto-whitelist.lock: Permission denied
Jul  4 21:25:02 bdcworld spamd[10573]: auto-whitelist: open of
auto-whitelist file failed: locker: safe_lock: cannot create tmp
lockfile /root/.spamassassin/auto-whitelist.lock.bdcworld.com.10573
for /root/.spamassassin/auto-whitelist.lock: Permission denied

How do i get rid of this

Thanks and Regards


Kaushal

Re: Permission Denied

Posted by Loren Wilton <lw...@earthlink.net>.
It looks to me like there is some confusion in your setup

Jul  4 22:27:11 smaapworld spamd[20049]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1486

This looks to me like something thinks it is runnning as root.  If it is running as 

#spamd -u kaushal &

why is it trying to create files in the root directory?

        Loren

Re: Permission Denied

Posted by Kaushal Shriyan <ka...@gmail.com>.
On 7/4/06, Matt Kettler <mk...@comcast.net> wrote:
>
> Kaushal Shriyan wrote:
> > Hi ALL
> >
> > I get this in the Sendmail Maillog
> >
> > Jul  4 21:25:02 bdcworld spamd[10573]: spamd: processing message
> > <6b...@mail.gmail.com> for
> > root:99
> > Jul  4 21:25:02 bdcworld spamd[10573]: mkdir /root/.spamassassin:
> > Permission denied at
> > /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1486
> > Jul  4 21:25:02 bdcworld spamd[10573]: locker: safe_lock: cannot
> > create tmp lockfile
> > /root/.spamassassin/auto-whitelist.lock.bdcworld.com.10573 for
> > /root/.spamassassin/auto-whitelist.lock: Permission denied
> > Jul  4 21:25:02 bdcworld spamd[10573]: auto-whitelist: open of
> > auto-whitelist file failed: locker: safe_lock: cannot create tmp
> > lockfile /root/.spamassassin/auto-whitelist.lock.bdcworld.com.10573
> > for /root/.spamassassin/auto-whitelist.lock: Permission denied
> >
> > How do i get rid of this
>
> Odds are you're running spamd as root, and calling spamc as root.
>
> Normally, when run as root spamd setuid's itself to the caller of spamc.
> However, if this turns out to also be root, spamd setuid's itself to
> "nobody" for security reasons.
>
> If you're calling spamc from a milter or some other system-wide way that
> winds up always being root, then force spamd to run as a non-root user
> by starting it with -u <username>. I'd suggest creating a new user
> account for this purpose, one which has it's own real home directory it
> can write to. It doesn't need to be able to login, but you'll want to be
> able to su to it so you can run sa-learn and other database maintenance
> tools.
>
>
>
>
Hi Matt

I run spamd as non-root user by using

#spamd -u kaushal &

but even then I am seeing the same error

[20049] error: mkdir /root/.spamassassin: Permission denied at
/usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1486
[20049] info: spamd: processing message <
6b16fb4c0607040959h6772c0b1s3b7a73985caa7c40@mail.gmail.com> for root:503
Jul  4 22:27:11 smaapworld sendmail[20063]: k64GvAvc020063: from=<
kaushalshriyan@gmail.com>, size=1489, class=0, nrcpts=1, msgid=<
6b16fb4c0607040959h6772c0b1s3b7a73985caa7c40@mail.gmail.com>, proto=ESMTP,
daemon=MTA, relay=wr-out-0506.google.com [64.233.184.239]
Jul  4 22:27:11 smaapworld spamd[20049]: spamd: connection from
localhost.localdomain [127.0.0.1] at port 44763
Jul  4 22:27:11 smaapworld spamd[20049]: mkdir /root/.spamassassin:
Permission denied at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm
line 1486
Jul  4 22:27:11 smaapworld spamd[20049]: spamd: processing message <
6b16fb4c0607040959h6772c0b1s3b7a73985caa7c40@mail.gmail.com> for root:503
[20049] error: mkdir /root/.spamassassin: Permission denied at
/usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1486
[20049] error: locker: safe_lock: cannot create tmp lockfile
/root/.spamassassin/auto-whitelist.lock.smaapworld.com.20049 for
/root/.spamassassin/auto-whitelist.lock: Permission denied
[20049] warn: auto-whitelist: open of auto-whitelist file failed: locker:
safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-
whitelist.lock.smaapworld.com.20049 for /root/.spamassassin/auto-
whitelist.lock: Permission denied
[20049] info: spamd: identified spam (1001.1/5.0) for root:503 in
2.7seconds, 1733 bytes.
[20049] info: spamd: result: Y 1001 -
DNS_FROM_RFC_ABUSE,GTUBE,HTML_MESSAGE,HTML_SHORT_LENGTH scantime=2.7
,size=1733,user=root,uid=503,required_score=5.0,rhost=localhost.localdomain
,raddr=127.0.0.1,rport=44763,mid=<
6b16fb4c0607040959h6772c0b1s3b7a73985caa7c40@mail.gmail.com>,autolearn=no
[20046] info: prefork: child states: II
Jul  4 22:27:14 smaapworld spamd[20049]: mkdir /root/.spamassassin:
Permission denied at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm
line 1486
Jul  4 22:27:14 smaapworld spamd[20049]: locker: safe_lock: cannot create
tmp lockfile /root/.spamassassin/auto-whitelist.lock.smaapworld.com.20049for
/root/.spamassassin/auto-
whitelist.lock: Permission denied
Jul  4 22:27:14 smaapworld spamd[20049]: auto-whitelist: open of
auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile
/root/.spamassassin/auto-whitelist.lock.smaapworld.com.20049 for
/root/.spamassassin/auto-whitelist.lock: Permission denied


Thanks and Regards

Kaushal

Re: Permission Denied

Posted by Matt Kettler <mk...@comcast.net>.
Kaushal Shriyan wrote:
> Hi ALL
>
> I get this in the Sendmail Maillog
>
> Jul  4 21:25:02 bdcworld spamd[10573]: spamd: processing message
> <6b...@mail.gmail.com> for
> root:99
> Jul  4 21:25:02 bdcworld spamd[10573]: mkdir /root/.spamassassin:
> Permission denied at
> /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm line 1486
> Jul  4 21:25:02 bdcworld spamd[10573]: locker: safe_lock: cannot
> create tmp lockfile
> /root/.spamassassin/auto-whitelist.lock.bdcworld.com.10573 for
> /root/.spamassassin/auto-whitelist.lock: Permission denied
> Jul  4 21:25:02 bdcworld spamd[10573]: auto-whitelist: open of
> auto-whitelist file failed: locker: safe_lock: cannot create tmp
> lockfile /root/.spamassassin/auto-whitelist.lock.bdcworld.com.10573
> for /root/.spamassassin/auto-whitelist.lock: Permission denied
>
> How do i get rid of this 

Odds are you're running spamd as root, and calling spamc as root.

Normally, when run as root spamd setuid's itself to the caller of spamc.
However, if this turns out to also be root, spamd setuid's itself to
"nobody" for security reasons.

If you're calling spamc from a milter or some other system-wide way that
winds up always being root, then force spamd to run as a non-root user
by starting it with -u <username>. I'd suggest creating a new user
account for this purpose, one which has it's own real home directory it
can write to. It doesn't need to be able to login, but you'll want to be
able to su to it so you can run sa-learn and other database maintenance
tools.