Startup Problem

Martin Hepworth martinh at SOLID-STATE-LOGIC.COM
Tue Aug 23 08:57:29 IST 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Rick Chadderdon wrote:
> Drew Marshall wrote:
> 
>> On 18 Aug 2005, at 16:24, Rick Chadderdon wrote:
>>
>>> When I execute /opt/MailScanner/bin/check_mailscanner as root with:
>>>
>>> Run As User = postfix
>>> Run As Group = postfix
>>>
>>> in MailScanner.conf, I get the error:
>>>
>>> ---
>>> Starting MailScanner...
>>> Cannot open config file /opt/MailScanner/etc/MailScanner.conf,  
>>> Permission
>>> denied at /opt/MailScanner/lib/MailScanner/Config.pm line 592.
>>> ---
>>>
>>> Seems easy enough, but I'm stuck.  I've chowned
>>> /opt/MailScanner/etc/MailScanner.conf to postfix:postfix.  I've  
>>> chmodded the
>>> file all the way to 777 and done the same for every file and  
>>> directory in
>>> the opt/MailScanner/ tree (including /opt/MailScanner).  None of this
>>> helped, so I got more creative...
>>
>>
>>
>> My MailScanner.conf is owned by root and sits with 644 permissions  
>> and MailScanner is started by root. As part of it's start up it moves  
>> to the Postfix user.
>>
>> Drew
>>
> Thanks, Drew.  That's how mine installed by default.  My problem is that 
> something that happens when the program switches UID/GID is keeping it 
> from opening the MailScanner.conf file regardless of the ownership or 
> permissions of the file.  I'm guessing that it's some kind of locking 
> issue but I don't know where it is.
> Right now, the file is owned by root and is 644.  I'm giving the postfix 
> user a bash shell, using su -c to launch check_mailscanner as the 
> postfix user and then removing the user's shell.  It works this way, so 
> I know that it's not a permission problem.  This is not the most 
> convenient way to launch MailScanner, however, so I'd like to find a 
> better solution than scripting this workaround.
> 
> I'm wondering whether Config.pm is locking MailScanner.conf exclusively 
> (as root, since UID hasn't changed yet) while it's doing its QuickPeek 
> and then the postfix user can't get through the lock...  But, it doesn't 
> seem as though if that were the case that it would be only affecting 
> this machine.  In any case, since I have a workaround it's becoming 
> harder to get myself motivated to figure it out.  It will slowly drive 
> me insane, however.
> 
> If additional info will help anyone else come up with ideas, I'm running 
> kernel 2.6.12-gentoo-r9 (it was -r6 when I started), perl version 5.8.6, 
> spamassassin version 3.0.4 and this is a fresh install from the latest 
> tar file.  I installed with the install.sh script and when that produced 
> these problems I used emerge to replace the perl modules from the 
> default Gentoo setup.  After that failed to help I removed perl and 
> rebuilt it and then installed the modules with cpan.  Didn't help.  I'm 
> running out of things to try.
> 
> ------------------------ MailScanner list ------------------------

Rick

Postfix is more than likely running in chroot-ed jail and therefor can't 
see the /opt/MailScanner directories...There's some stuff in the wiki 
about this but not much..

http://wiki.mailscanner.info/doku.php?id=documentation:configuration:mta:postfix:installation


-- 
--
Martin Hepworth
Senior Systems Administrator
Solid State Logic Ltd
tel: +44 (0)1865 842300

**********************************************************************

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote confirms that this email message has been swept
for the presence of computer viruses and is believed to be clean.	

**********************************************************************

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list