> >> This gives USER=postfix and HOME=/root > > > > I know. :) That was meant for your enlightenment... > > Thanks
> so how do I fix the mkdir /root/.spamassassin failed error? You don't. Seriously, see above. sudo switches the user, it does not necessarily mean you get the same environment as a daemon running as that user. Hence SA trying to access / write in a HOME dir not owned by the current user but inherited. > Sorry but i'm sooo super confused right now - What user does SA usually run under? Where does it get it's env, in particular the HOME? Mimic that, if you want to see how it would do. Again, sudo as above just switches the user. It does not reflect what your SA running user's environment is, and which files it accesses. > yup I get that i just don't know what to do next to fix the permissions > error. Run your checks as the SA running user. Do use it's environment. Otherwise, your debugging will not show what the real system is like and where the issue is. >From another post of yours it seems you get errors su'ing to postfix. Dunno about that right now, it's late here, and frankly -- I don't know what user you're running SA as, or how it is called. All I know is that you tried switching to postfix. BTW, hint, the '-' in Andrews post is key, to get the user's environment instead of inheriting the calling one's. > Thanks for your time Karsten, I appreciate your help and apologise for > being linux 'thick' at times. It'd definitely be worthwhile to read up a little on su, sudo, the environment (hint: see '-') and maybe HOME. Just so you understand why merely switching user doesn't effect the env, and why your unprivileged postfix user tried to mess with root's home. Anyway, what was all this about again? FuzzyOCR? Just to catch the recent image spams? They can easily be detected without it. Never scored below 5 here, and gets an additional 2 points using the nice meta posted recently by John Hardin on this list. -- char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}