HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] problems accessing hosts.hfaxd [for the record]



hi all,

its time to answer my own question (yeah - i got it running)

daemon.log told me that hylafax couldn't read the
/etc/hylafax/hosts.hfaxd file - so hylafax couldn't authenticate. The
/etc/hylafax/hosts.hfaxd file existed and was readable (mode 600) by the
uucp user (hfaxd is running as uucp).
So i took a short look into the hfaxd/User.c++ file - there i found this
function:
--------------------------------------------------------
bool
HylaFAXServer::checkUser(const char* name)
{
    bool check = false;
    FILE* db = fopen(fixPathname(userAccessFile), "r");
    if (db != NULL) {
        check = checkuser(db, name) || checkuser(name);
        fclose(db);
    } else
        logError("Unable to open the user access file %s: %s",
            (const char*) userAccessFile, strerror(errno));
    return (check);
}
------------------------------------------------------
which tries to open the user access file - but when it fails then it
creates the error message (which then appears in daemon.log) with the
wrong file path/name - so i changed the line:
-----------------
 logError("Unable to open the user access file %s: %s",
            (const char*) userAccessFile, strerror(errno));
-----------------
to
-----------------
 logError("Unable to open the user access file %s: %s",
            (const char*) fixPathname(userAccessFile), strerror(errno));
-----------------
and recompiled - restarted hfaxd.
Now i could see in the logs that hylafax was trying to access the file
"etc/hylafax/hosts.hfaxd" and not directly "/etc/hylafax/hosts.hfaxd".
The problem is that with the debian standard installation the files in
/etc/hylafax are getting copied (not symlinked - why?) to
/var/spool/hylafax/etc - so the file
/var/spool/hylafax/etc/hylafax/hosts.hfaxd really does not exists. i've
now created this directory and symlinked the hosts.hfaxd file into it -
now its working.

So, i think the debian package needs to get cleaned up that it will
work.

regards,
Wolfgang

Am Mo, den 25.10.2004 schrieb Wolfgang Pichler um 17:47:
> hi all,
> 
> i've encountered another problem on my fresh debian (sarge) and hylafax
> install.
> 
> My clients can't authenticate against the hfaxd because the hfaxd can't
> access the ./etc/hosts.hfaxd file (thats what i know because of this
> daemon.log line):
> Oct 25 19:07:22 localhost HylaFAX[10143]: Unable to open the user access
> file /etc/hylafax/hosts.hfaxd: No such file or directory
> Oct 25 19:07:22 localhost HylaFAX[10143]: HylaFAX LOGIN REFUSED (user
> denied) FROM selene.dialog [172.16.0.189], wpichler
> 
> ps -aux shows me:
> uucp     10135  0.0  0.3  4792 1720 ?        Ss   19:07   0:00
> /usr/sbin/hfaxd -i 4559
> 
> that my hfaxd is running as user uucp (standard fax user on debian)
> 
> my hosts.hfaxd file has the following access rights:
> -rw-------  1 uucp uucp    24 2004-10-25 19:06 hosts.hfaxd
> 
> which seems perfectly ok
> 
> in my /etc/passwd i have:
> uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
> 
> and in my group file i have:
> uucp:x:10:
> 
> so, as far as i can see there should not be any problem...
> 
> whats going wrong ?
> 
> regards,
> Wolfgang
> 
> 
> 
> ____________________ HylaFAX(tm) Users Mailing List _______________________
>   To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
>  On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
>   *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*


____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions