Walking the file system?

  • Thread starter Thread starter Andrew Ting
  • Start date Start date
A

Andrew Ting

Hi there,


I have a web app that needs to create a folder using

Directory.CreateDirectory(path);

This works fine, but once we deployed, for some reason giving
read/write permissions to just the data folder in this example won't
work.

d:\abc\def\data\new folder


We had to give read access to all folders from the root of d:

To make things worse, the .net code seems to traverse the file system
(using a file utility from sysinternals to monitor) so it goes to

d:\
d:\abc
d:\abc\def
d:\abc\data\new folder.

Any ideas why this is?

THANKS in advance.

Regards,
Andrew
 
Rights are inherent from parent folders/directories so
you cannot block a read in a branch and expect any
subdirectories to have read ability.
 
Also without explicitely granting privledes to each
folder/directory in its path you authorize the OS to
grant rights to each subdirectory/file in the tree and
hence you get everything and not just the parents of your
project folder.
 
Back
Top