HylaFAX Client (YajHFC) Can't save file .tif

c0nc0rd3

Joined
Mar 12, 2010
Messages
2
Likes
0
Points
0
#1
Im using elastix 1.6-12
I´ve setup Fax like in "Elastix without tears".

Problems:
1- HylaFax client (YajHFC-0.4.2a) is able to see the fax receives but when i try get them, get the message:An error occured displaying the file recvq/fax0000000020.tif(job fax0000000020.tif): 550 recvq/fax0000000020.tif: Operation not permitted.
In Details -->> java.io.FileNotFoundException: 550 recvq/fax0000000020.tif: Operation not permitted.



2. But file fax00000000020.tif are in /var/www/html/faxes/recvd/2010/3/12/021.../000000094/fax.pdf

Can anyone give me some advices about this?


Thank you.
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#2
Check the permissions of the folder and make sure its set right, I do not think Yaj would be accessing as root, just a client from your pc IP, so maybe change the permissions for everyone. Then again I am not 100%
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#3
ok so my suspicions were confirmed in that the files that I could open and save located in /var/spool/hylafax/recvq had some set with uucp and not root, once I changed those to root, I could then open the file through Yaj. Play with the permissions hope it helps.

My problem seems to be that when a new fax comes in, they are all being set to uucp and not root, I will work on it and update your post.
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#4

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#5
Hylafax (which runs as uucp) will save your fax for example as:

/var/spool/hylafax/recvq/fax0000000020.tif

it's owner and group will be uucp:uucp

The clue is that the variable $FILE in FaxDispatch will be the file name of that that instance of the tiff (fax), you can chmod, chown it,mv copy render or print it there but as that process is run by uucp you will need to give uucp permissions to do that.

That this particular Hylafax client (I'm not familiar with it) doesn't know that hylafax runs as uucp surprises me a little, perhaps in it's configuration you can tell it to connect as user uucp and thus be able to access those raw faxes.

JM2CWAE

dicko

p.s. as rollinsolo mused almost anything that connects to your server as root (apart from itself) is probably "not a good thing", and that you allow it is also "of that ilk"
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#6
Here are my configurations.

etc/hylafax/hfaxd.conf (at the bottom of the file)

JobProtection: 0700
PublicJobQ: false
PublicRecvQ: false

then in /var/spool/hylafax/etc/config.ttyIAX1 (I changed the following lines from 0600 to 0700 just tried that not sure if it's right)

RecvFileMode: 0700
LogFileMode: 0700
DeviceMode: 0700

then in /var/spool/hylafax/etc/FaxDispatch I have:

SENDTO=root;
FILETYPE=pdf;

case "$DEVICE" in
ttyIAX1) sudo chgrp clearvoice $FILE
chmod g+rw $FILE
SENDTO=dinoc@clearvoice.us
;;
ttyIAX2) sudo chgrp clearvoice $FILE
chmod g+rw $FILE
SENDTO=dinoc@clearvoice.us
;;
esac


and in /etc/sudoers (at the bottom I put: taking Dicko's Excerpt)

Defaults:uucp !requiretty
uucp ALL=(root) NOPASSWD: /bin/chmod, /bin/chown

---------------------------------------------------------------

So I am assuming in the above chmod's in FaxDispatch that I should add some chown root:root $FILE lines below the chmod lines, and then I will update the post.

I also created a faxuser and user clearvoice and updated the hosts file to allow the user to access Hylafax, used that name and password in YajHFC but still could not open the files, and the incoming .tif's still had the wrong permissions so I do not think I changed anything to any specific group.
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#7
HylaFAX (YajHFC) Can't save file .tif (Solved)

Alright Got it figured out now.
Here is what I did.

etc/hylafax/hfaxd.conf (at the bottom of the file add the following, save and exit)

JobProtection: 0777
PublicJobQ: false
PublicRecvQ: false

then in /var/spool/hylafax/etc/config.ttyIAX1 (I changed the following lines from 0600 to 0777 just tried that not sure if it's right, also I have two modems so I did this for both, change, save, exit)

RecvFileMode: 0777
LogFileMode: 0777
DeviceMode: 0777
_____________________________

First Create a New Fax User so we can move some ownership to the new user.

##(choose whatever user name you want and your password in the appropriate place)##

so in putty type:

faxadduser ExampleUser -p NewUserPassword
useradd ExampleUser

----------------------
The first command will update your /var/spool/hylafax/etc/hosts.hfaxd file and allow this user as a host.
The second is needed to create a user in Elastix because we need the group # created in /etc/group.

It should be located at the bottom of the file and look something like:

ExampleUser:x:501:

We want to remember the 2nd variable in the string so 501.Your Variable might and will be different. Just jot it down.
--------------------------------------------
go back into /var/spool/hylafax/etc/hosts.hfaxd
and You will see ^ExampleUser@::HU8ehhfjdfhk (i just typed a bunch of letters it will vary for you)

Place the 501 in between the :: so it should now look like:

^ExampleUser@:501:HU8ehhfjdfhk

ok save the file and exit.
--------------------------------------------------------
Now in and in /etc/sudoers (at the bottom I put: taking Dicko's Excerpt, add the following, save, exit )

Defaults:uucp !requiretty
uucp ALL=(root) NOPASSWD: /bin/chmod, /bin/chown

--------------------------------------------------------------------

Now the last and I believe the most important part is to manipulate the faxes as they come into Hylafax through FaxDispatch.

Go to /var/spool/hylafax/etc/FaxDispatch and I added the following (keep in mind I have two Fax Modems configured).

SENDTO=yourEmailAddy;
FILETYPE=pdf;

case "$DEVICE" in
ttyIAX1) sudo chgrp ExampleUser $FILE
chmod a+rw $FILE
chown ExampleUser:root $FILE
SENDTO=whateverEmailaddyUwant
;;
ttyIAX2) sudo chgrp ExampleUser $FILE
chmod a+rw $FILE
chown ExampleUser:root $FILE
SENDTO=whateverEmailaddyUwant
;;
esac

-------------------------------------------------

now save the file, reboot the server and you can now log into YajHFC with the user name and password created and open the file attachments as needed.
I am pretty sure the above might not be the most secure way to assign permissions after the fax comes in, but I got it working, thanks to Dicko, PHBarry and some Hylafax documentation.
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#8
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

Just a later FYI, I re-installed avantfax after this fix, and it rewrote my faxdispatch file after a restart, and then I was not able to open the faxes again, so uninstalled and then reconfigured the files again and all is well.
 

cheeks

Joined
Apr 11, 2009
Messages
49
Likes
0
Points
0
#9
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

rollinsolo Thanks very much for your Solution

I have implemented it and it works great however I have Two Questions.

I am using YajHFC Fax Client and Only have Two iax2 Fax Extensions (Elastix 1.60)
being 15 and 16. In the YajHFC Fax Client (Two Windows XP Boxes) both users are getting All the Faxes (Each Fax Client is setup with One Extension). How do I make it so that Each PC can Only Receive There Own Faxes from there Fax Extension?

I have an IVR setup with option 6 to receive a Fax. This fax goes to Ext: 15, however some Clients are Complaining that they do not have a Phone Connected to there Fax Machine and do not know that they need to Press 6 to Send a Fax. How do setup the Elastix IVR to Automatically Detect a Fax Signal and then Forward the fax to Ext: 15?

Any Help Greatly appreciated. :)
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#10
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

An easy solution to this would be to set up an inbound route (phone # or DID) to point to that extension. (IAX ext), and the fax would go straight to that person.
 

cheeks

Joined
Apr 11, 2009
Messages
49
Likes
0
Points
0
#11
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

rollinsolo Thanks very much for your reply

you mentioned that i need " set up an inbound route (phone # or DID) to point to that extension. (IAX ext), and the fax would go straight to that person "

i have one inbound route that goes to my ivr. there is a fax ext option, however when i use the fax option with the ivr option then nothing works?

do i need to create another inbound route and point that to the fax ext? (sorry for the noob questions)

any help greatly appreciated
 

rollinsolo

Joined
Feb 11, 2009
Messages
279
Likes
0
Points
0
#12
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

Yes the more detail you give in your post is the better I can answer, so you only have one phone #, then it would be hard to direct one number and delegate faxes to two people, do you use VoIP if so then most DID's are like $1 a month so its no big deal to buy a couple and point them where you need them. so the answer is yes get some more DID's if its voip and point them to the designated ext, if its analog service then it gets expensive and you have to weigh the importance of the purchase. Also if my post has helped please increase my karma (green thumbs up in the top right)its there to show I help and not just receive (which I have got a lot more of that then karma, lol) so thanks.
 

cheeks

Joined
Apr 11, 2009
Messages
49
Likes
0
Points
0
#13
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

rollinsolo Thanks very much for your help

i need help on my ivr and i hope you can guide me on what to do

i'm using elastix 1.6 and have setup 8 extensions ( ext no 10 - 17 )and one incoming did with the office ivr setup is " main " ( ext 16 and ext 17 are for fax )

on my personal extension ( 15 ) i have placed a recording in case i'm not at the office however i need to make a personal ivr so that if the caller wants to send a direct fax or go back to the reception i need the caller to press the appropriate numbers as per my personal ivr. how do i get this done on elastix?

any help greatly appreciated
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#14
Re:HylaFAX (YajHFC) Can't save file .tif (Solved)

You might find the "VMX locater" will work for you.
 

maikcat

Joined
Apr 24, 2009
Messages
38
Likes
0
Points
0
#15
hi all,

i solved the permission problem entering the following using crontab -e

*/1 * * * * chmod 666 /var/spool/hylafax/recvq/*.tif

not exactly science but is works.. :))

cheers
 

mon888

Joined
Jul 16, 2010
Messages
2
Likes
0
Points
0
#16

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,900
Messages
130,884
Members
17,561
Latest member
marouen
Top