Home All Groups Group Topic Archive Search About

Moving file into folder... file doesn't inherit folder permissions?

Author
18 Jun 2009 12:17 AM
Andy
Hi,

I have an asp.net C# application, where I upload a file.  It's put in
a temporary location until processed, and then I do a simple File.Move
to it's more permante location (which is located in a directory under
the root of the web application).

The folder was set to replace permissions on child objects and enable
inheritance... yet when files are moved into the folder, the
permissions on the file don't match the folder.

Any ideas?  This only seems to be an issue on Windows 2003 Standard;
on WinXP, the permissions seem to set properly.

Thanks
Andy

Author
18 Jun 2009 1:25 PM
Jeff Johnson
Show quote Hide quote
"Andy" <ajj3***@alum.rit.edu> wrote in message
news:288128c4-ab93-4e6a-b216-0b73b59d5e69@h23g2000vbc.googlegroups.com...

> I have an asp.net C# application, where I upload a file.  It's put in
> a temporary location until processed, and then I do a simple File.Move
> to it's more permante location (which is located in a directory under
> the root of the web application).
>
> The folder was set to replace permissions on child objects and enable
> inheritance... yet when files are moved into the folder, the
> permissions on the file don't match the folder.
>
> Any ideas?  This only seems to be an issue on Windows 2003 Standard;
> on WinXP, the permissions seem to set properly.

Really? I was under the impression that since like, NT, a MOVE brought
existing permissions with it, whereas as COPY would inherit the permissions
of the destination folder. So what you're describing sounds like standard
behavior, and I'm surprised you say you've seen it work differently on XP.

Bookmark and Share