# spamassassin: whitelist problem [SOLVED]

## hoacker

Hi. I recently installed spamassassin on my little home server. I cannot get rid of these messages:

```
Jun  9 21:15:08 steward spamd[18983]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /home/spamassassin/.spamassassin/auto-whitelist.lock.steward.18983 for /home/spamassassin/.spamassassin/auto-whitelist.lock: Keine Berechtigung

```

(Keine Berechtigung = no permission)

This seems strange to me, because the folder has write permissions for everybody:

```
# ls -al /home/spamassassin/.spamassassin/

insgesamt 16

drwxrwxrwx 2 spamassassin spamassassin  4096  9. Jun 21:35 .

drw-rw-rw- 4 spamassassin spamassassin  4096  9. Jun 20:17 ..

-rw-rw-rw- 1 root         root         12288  9. Jun 20:17 auto-whitelist

```

Anyone can help?Last edited by hoacker on Fri Jun 12, 2009 8:21 pm; edited 2 times in total

----------

## vaguy02

I would recommend changing the owner of the file to whatever user account that spamassassin is running under, (ie. spamd or mail). Hopefully not root, even if everyone has permissions to the file, if it's not owner, sometimes it gets a little funky.

Edit: Oops. The user would be spamassassin based on the upperfolder.  :Smile: 

----------

## hoacker

Vaguy02, thanks for your response.

 *vaguy02 wrote:*   

> I would recommend changing the owner of the file [...]

 

Which file? I already tried creating auto-whitelist.lock with chmod 666 and chown spamassassin:spamassassin but that didn't help. I decided to delete it again. That's no use creating auto-whitelist.lock.steward.18983 because 18983 is the pid which changes every time spamd is (re)started. So it's beyond me...

----------

## vaguy02

Let me make sure I understood your post correctly. You changed the owner of the auto-whitelist using 

```
chown spamassassin auto-whitelist
```

 then you restarted the spamassassin daemon? And this did not fix your problem?

----------

## hoacker

 *vaguy02 wrote:*   

> Let me make sure I understood your post correctly. You changed the owner of the auto-whitelist using 
> 
> ```
> chown spamassassin auto-whitelist
> ```
> ...

 

Well, I tried so many things the last days. I'm quite sure I tried that, too. But I didn't write that in this thread. 

The file ~/.spamassassin/auto-whitelist was created by spamd, I (just again) changed the file permissions.

The log is about other files: ~/.spamassassin/auto-whitelist.lock and ~/.spamassassin/auto-whitelist.lock.HOSTNAME.PID

So this is the current state:

```
# ls -al /home/spamassassin/.spamassassin/

insgesamt 16

drwxrwxrwx 2 spamassassin spamassassin  4096 10. Jun 21:49 .

drw-rw-rw- 4 spamassassin spamassassin  4096  9. Jun 20:17 ..

-rw-rw-rw- 1 spamassassin spamassassin 12288  9. Jun 20:17 auto-whitelist

```

But still:

```
Jun 10 21:50:07 steward spamd[9650]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /home/spamassassin/.spamassassin/auto-whitelist.lock.steward.9650 for /home/spamassassin/.spamassassin/auto-whitelist.lock: Keine Berechtigung

```

I even changed /etc/conf.d/spamd to make sure that spamd runs as user spamassassin, reverted it again and and and ...

----------

## vaguy02

I'm just guessing here, but are you running a hardened kernel?

I had a problem with a ubuntu server box giving me permission denied to a file that the user had owner to, turned out to be apparmor not allowing the user to access that specific area. I know it's not a ubuntu box, but I'm pretty sure the hardened kernel has something similar.

----------

## hoacker

 *vaguy02 wrote:*   

> I'm just guessing here, but are you running a hardened kernel?

 

No, plain gentoo-kernel...

----------

## vaguy02

Hum....okay. Strike 2.

Are you running spamd as a non-root user?

```

spamd -u nobody &

```

----------

## hoacker

same message with 

spamd -u spamassassin

spamd -u nobody

spamd

----------

## hoacker

I'm done with auto_whitelist for the moment, I switched it off. Thanks vaguy02 for your help.

----------

## hoacker

Moved bayes and whitelist from /home/spamassassin/.spamassassin/ to /var/spool/spamassassin/ and now it seems to work...

----------

