Linux Permission denied– not really

One of the things that pisses me off with Linux, is the lack of good error messages. Today I wasted a good amount of time tracking down this error:

_WARN: config: path “/var/lib/amavis/.spamassassin/user_prefs” is inaccessible: Permission denied

Now, you’d think based on the message that the user_prefs file or the directory above it didn’t have the proper permissions for the user/executable accessing it… That’s what “permission denied” means, right? ¬†WRONG. After hours dicking around, I eventually found that the problem was that the permissions were TOO OPEN… Instead of 700 on the .spamassassin directory, I had it set to 666(and 660 at one point)… As soon as I set the permissions on the .spamassassin directory to 700, the problem went away…

Now, I’d guess this is the amavis developers’ fault at least partly– I’ve seen other linux-based apps say “permissions are too open” regarding file permissions before(ssh key files, for one)… Possibly there’s something in the file-accessing API that you can request that permissions aren’t too open, and they just have a single fall-thru that says “permission denied”… ¬†Either way, this type of thing causes me to waste considerable amount of time, and is the primary reason I’m very shy about adopting Linux for too many things– as much as I’ve tried over the past 13 years… In this case, I was configuring a front-end mail server using postfix+amavis+dovecot+spamassassin, as I don’t know of any good alternative for Windows(MS SMTP front-end is incredibly weak).