<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 8, 2013 at 2:02 PM, Tamara Temple <span dir="ltr"><<a href="mailto:tamouse.lists@gmail.com" target="_blank">tamouse.lists@gmail.com</a>></span> wrote:<br>

> On Jul 8, 2013, at 10:47 AM, Mark Lee <<a href="mailto:mark.lee.phd@gmail.com">mark.lee.phd@gmail.com</a>> wrote:<br>><br>> > I created a folder called "images" in same path as pmwiki.php (i.e. when I list out the folders with my ftp tool, I see folders for the images folder as well as the folders cookbook, local, script, pub, wiki.d, etc). When I do the wikish command {(ls)} I see filenames in the folder wiki.d. I want to list out the jpg file names in the images folder and using wikish. I also want to list the jpg files in folders contained within the images folder. How do I do this?<br>

> > -Mark<br><br></div><div class="gmail_quote">You have to give wikish permission to read textfiles rather than just pmwiki pages.  This is documented in the "wikish configuration" page (<a href="http://www.pmwiki.org/wiki/Cookbook/WikiShConfig">http://www.pmwiki.org/wiki/Cookbook/WikiShConfig</a>) as an example under #E.  Then, once you have that permission you would access it like this:<br>

<br></div><div class="gmail_quote">{(ls TEXTFILE--uploads/*.jpg)}<br><br></div><div class="gmail_quote">NOTE THAT THERE ARE SIGNIFICANT POTENTIAL SECURITY HAZARDS TO CONSIDER IN THIS.  You will want to make sure that nobody but trusted authors have write privilege to the pages which have the textfile access authorization.<br>

</div><div class="gmail_quote"><br>> I've never used wikish, but isn't it just passing scripts to /bin/bash? If so, then I'd expect something like {{ls -R ../images/}} to work?</div><br></div><div class="gmail_extra">

Actually wikish doesn't make use of /bin/bash at all.  All the functionality is implemented from scratch in PHP.  This was the only way to allow transparent access to pages while also absolutely enforcing the appropriate security model.<br>

<br></div><div class="gmail_extra">-Peter<br></div></div>