[ic] [if file] question
Mike Heins
mike at perusion.com
Mon Aug 6 08:54:42 EDT 2007
Quoting Dan Bergan (danb at berganconsulting.com):
> On 8/5/07, Mike Heins <mike at perusion.com> wrote:
> > Quoting Dan Bergan (danb at berganconsulting.com):
> > > I'm having trouble with the [if file] tag.
> > >
> > > I have created a symbolic link in my catroot to a directory. I have
> > > given the interchange user permission to the directory. I can log in
> > > to the command prompt as the interchange user and see the directory
> > > and I can read the files.
> > >
> > > when I try:
> > >
> > > [if type=file term=|files/test.txt|]found![/if]
> > >
> > > it doesn't not see the file.
> > >
> > > I have also tried the full path to the file, and still nothing. I'm
> > > sure I'm doing something stupid, but I just can't see what I'm doing
> > > wrong. Can anyone point out what my problem might be?
> > >
> >
> > Paths are relative to the catalog directory, not interchange
> > or home directory.
> >
> I believe that is what I did...
>
> My catalog directory is:
> /var/lib/interchange/catalog
>
> The actual directory is in my httpdocs directory, called "files". So,
> I created a symbolic link to the "files" directory. So, now there is
> a sub-directory:
> /var/lib/interchange/catalog/files
> And then I tried: [if type=file term=|files/test.txt|]found![/if]
>
> Can the [if file] follow a symbolic link?
Yes it can, presuming your file system permissions permit that. It
is just a perl file test.
Try from the shell:
$ touch /var/lib/interchange/catalog/test.txt
Then in the page:
[if file test.txt]found! [else] NOT FOUND [/else] [/if]
That will tell you if your directory permissions are the problem.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
More information about the interchange-users
mailing list