I think I've found a solution, although it might not be the best.  It
is the only thing I could think of right now.  If anyone has a better
idea, let me know:

It was indeed a problem with permissions.  I had to chown root.root on
qmailadmin.  but that wasn't all.  In qmail's assign file, the uid/gid
of the domain i added (w/ vadddomain -i 510 -g 510 newdomain.com
password123) was 510/510.  I think when i try to login with qmailadmin
under that domain, it setuid's to 510/510, and so it wasn't able to
read the vital file ~vpopmail/etc/vpopmail.mysql (since it's only
readable by user vpopmail).  i know this because i see this in apache's
error_log:

vmysql: can't read settings from /usr/local/vpopmail/etc/vpopmail.mysql
vmysql: sql error[3]: MySQL server has gone away

the stupid solution is to chmod 644 the vpopmail.mysql file, although
it works. another solution would be to change the uid/gid for that
domain in qmail's assign file to 89/89 (vpopmail's uid/gid) and then
chown vpopmail.vchkpw the "domains" dir in 510/510's home dir AND the
home dir itself (or chmod 744 510/510's home dir).  i don't like this
solution either as i want to keep 510/510's home dir owned by that user
AND have 700 permission for privacy.

so the only other solution which i could think of was to set that
domain's uid/gid as 0/0 in qmail's assign file.  now, what kind of
security risks could this setup pose?  i'm brand new to qmail, so i'm
not sure (just installed it a few days ago).

Another question:  what is the difference between the -u and -i/-g
flags when running the vadddomain?  they seem to do the same things.  I
know this isn't the vpopmail mailing list, so you don't have to
respond.

(ps Oh yeah, and my PHP/apache setup is like this: not as an apache mod
but as CGI/FastCGI, so suexec not only affects all CGI scripts, but
also PHP scripts.  however, suexec seems to be totally irrelevant to
the "invalid login" problem.)

Reply via email to