[ic] [if file] question

Mike Heins mike at perusion.com
Mon Aug 6 11:08:00 EDT 2007


Quoting Dan Bergan (danb at berganconsulting.com):
> On 8/6/07, Mike Heins <mike at perusion.com> wrote:
> > Quoting Dan Bergan (danb at berganconsulting.com):
> > > On 8/6/07, Mike Heins <mike at perusion.com> wrote:
> > > [snip]
> > > > >
> > > > > 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
> > > >
> > >
> > > As the interchange user:
> > > $touch /var/lib/interchange/catalog/files/test.txt
> > >
> > > this seemed to work -- returned nothing.
> > >
> > > > Then in the page:
> > > >
> > > >   [if file test.txt]found! [else] NOT FOUND [/else] [/if]
> > >
> > > [if type=file term=|files/test.txt|]found! [else] NOT FOUND [/else] [/if]
> >
> > I just realized you decided to make up your own test syntax -- I told
> > you what to put. If what I put works, and what you did didn't, then
> > it is in the permissions of your file system.
> >
> Sorry, Mike.
> 
> I thought I was supposed to try this with my symlinked directory.
> Exactly as you stated above, it does work fine.  In the symlinked
> directory, the "touch" command works, the [if file] does not.

Then it is just a file permission thing. If you are using Plesk,
it will usually set 750 permissions, with the group being their
group. The interchange user probably has no permission, that's all.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

{((>:o}~  <<<<Oh look!!! An idolatrous image of the prophet!!! Surely
we must now avenge this blasphemy by burning down the world!!!


More information about the interchange-users mailing list