views:

71

answers:

1

Always returns an empty array despite giving the IUSR_ "List Folder Contents" permission (and "Read" and "Read & Execute" permissons) on the folder being 'globbed'. glob() on a child directory (within the directory I gave the permissions too) works fine. glob() also works on a specific file (which inherited the permissons) in the afore mentioned directory that it fails on...

UPDATE: The code I am using (which I can see works on other dirs) is:

$files = glob("..\\LocalFolder\\Images\\$partfilename*");
echo '<p><pre>';
print_r($files);
echo '</pre></p>';

I can get it to work on a dir within the Images dir!

UPDATE2: To clarify: the problem was: permissions were applied to the Images folder and the above code always returned an empty array.

A: 

Turns out you need to apply the permissions to the grand parent folder, i.e. in the above case: LocalFolder.

This is not very satisfactory as there could be many other files/folders therein that you do not want to give your IUSR_ (internet guest account user) the same permissions! I wonder whether glob() or Server 2003 is causing this behaviour?...

Mrk Mnl
Incidentally: you can then deny the IUSR_ explicitly on any other files/folders in the parent folder you do not want them to have the inherited permissions.
Mrk Mnl