HylaFAX The world's most advanced open source fax server

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

Re: faxrcvd script does not work



Nico Kadel-Garcia wrote:
> > I mkdir /var/spool/fax/ftp directory and wanted to copy only received
> > faxes into that directory, but can not run this cp command (although I
> > copied 'cp' tp /var/spool/fax/bin/.
> 
> Hmm. Haven't tried this kind of stunt myself: I simply make symbolic
> links from /var/spool/fax/recvq to wherever I want the faxes to be
> visible as a user, not as part of the faxrcvd process.
> 

I want to explain the whole process. I want to put faxes in sepereta
directories based on date. (for example all 1/1/2000 dated faxes fill go
to somewhere/2000/01/01/*)

For that I write a small program with c. That program takes directories
as parameters and checkes for their existence. If it can not find the
directory, it tries to create it. If it does this for all directories
returns 0 if fails on some routine it returns a negative value.

And, lets come to path settings.
About path settings I look at /var/spool/fax/etc/setup.cache file. In
that file /bin, /sbin, /usr/sbin. I guess these are my search path
(correct me if I am wrong).

If I am correct; date, cp, mv commands should run in script. If they do
not... I return to beginning I do not undertand the working style of
this script.

And, although date, cp, mv commands are in path (according to me) I
copied a copy of them to /var/spool/fax/bin/ dir. I tried to run
commands like bin/cp and bin/date.

After some parameter and usage changes I get error numbers from faxrcvd
like 01000, 0400, 0774.

After a little search I find that I can run only cat command.

cat $FILE > abc.tif (works)
cat $FILE > ftp/abc.tif (doesn't work)

ftp is a directory under fax. It is not a link. its permissions is set
to 755.

> 
> Looks like the chroot problem. Let me make a quick and dirty suggestion:
> teach faxrcvd to do a
> 
>         mkdir -p destination directory
> 
> And see exactly where that destination is winding up. Then realize
> that you are dealing with files *THERE*, and let faxrcvd set the file
> permissions or anything else there appropriately. This is a quick and
> dirty, and while not necessarily secure might save you some time.
> 

Security is not a problem. I will reach these files with anonymous ftp
connection. I will try this tomorrow and let you know.

Thank you.

-- 
Ertan Kucukoglu
ertank@ozlerplastik.com




Project hosted by iFAX Solutions