WebFileUploader Permission Problems

I’ve just been struggling with this and I thought I’d share with the forum.

If you upload a file to a Windows server using the WebFileUploader and then Move the file from the temporary folder to another folder on the server, the file does NOT inherit the permissions from folder your move the file to. This was causing me problems because I wanted to display the file as a link from my website and I was getting permission problems.

If you want the file to inherit the permissions from the destination folder, do a Copy instead (followed by a Delete from the temporary folder).

Windows has worked this way as far back as Windows NT. A Copy inherits permissions from the target folder. A Move keeps the original permissions. The exception is a Move from one filesystem to another. In that case it’s more like a Copy/Delete so the Copy inherits permissions from the target drive/folder.

Thanks Frederick! I didn’t realise that and it caught me out.