Did you edit the file on a windows machine in notepad?  If so it could have a ^M at the end of every line in the file that you cannot always see with vi.  Try vim .

Also where is you .sock file for mysql.  I had a system once that was looking for it in 2 different places.
/var/run/mysql/mysql.sock
/tmp/mysql.sock

to fix I did a soft link to the missing one.


Jay Moore

 matt wrote:

matt wrote:

  
In the apache logs I see

vmysql: can't read settings from /home/vpopmail/etc/vpopmail.mysql

although I don't see a reason it wouldn't be able to read that when it
executes setuid
    

  
If it says that, it _is_ having a problem reading the file where it 
stores the settings needed to open the database.
      

I agree %100 it is having problems but I don’t see why it would, in that
/home/vpopmail is locked down tight with 700 permissions but with SUID it
shouldn't be a problem. I've also tried lightening the permissions to 755
for a test and it still can't read the file. The file is not corrupt so I
can't see the problem (this is why this whole problem is so frustrating I
see the problem but can't see why)


  
I also see 

vmysql: sql error[3]: MySQL server has gone away

which is probably because it can't get the correct login details for mysql
from vpopmail.mysql
    

  
If there is one of these for each can't read message, it is certain.
      

There is only a "can't read vpopmail.mysql" error now and then, certainly
not every attempt, however as you rightly say there is a " vmysql: sql
error[3]: MySQL server has gone away" which I would expect if it couldn't
get the database credentials, so I'm not too worried about that.
Again mysql is working and vqadmin and vpopmail use it fine, I can also use
the command line ok, so the problem is looking very much like all down to
not being able to read the vpopmail.mysql file to get the credentials.

  
Mysql is fine - vqadmin and vpopmail are using it fine, I can connect to
mysql and the vpopmail database using the vpopmail use from the command
line, and I can select and update manually so there is %100 no problem
there, which is backed up by vqadmin.
    

  
So why can't qmailadmin read the configuration file with the database 
settings in it?  Find that and you've probably got it.
      

That’s the big question ? I'm don't know if I'm looking too deep and missing
something stupid and obvious, but I just can't see why this file cannot be
read. Even with more open permissions than the default quite tight
permissions this file is not being read. 

I've re-built qmailadmin and checked everything, it has the right file
location which the error message backs up, it has the right UID/GID, SUID is
set, the file is readable by a user, so not corrupt. The partition it
mounted with the correct options, what am I missing ??

Very frustrating, this all works fine on all my other mail machines.

If you have suggestions on this, or think I'm missing something obvious I'd
love to hear it as I'm in a loop here.

Thanks for the input so far.

Matt


Rick

  


--
Untitled Document

Jay Moore
MooreTec Consulting
http://www.mooretec.net
Email Me!

<<inline: email.gif>>

Reply via email to