I have a web server on Windows Server 2008 running IIS7.

One on of my web sites, I have a folder which contains images which users can view with my mobile phone app. Unless I set the correct permissions on the images, they get:

401 - Unauthorized: Access is denied due to invalid credentials.

So I set the permissions ('Everyone' can read the files) and can then view the images.

The problem is, I run a script to download these images from another source and place them in this folder. The updated images then don't have the appropriate permissions any more. Back to square one!

Is there a way to set this folder so any file that is created in that folder has the permissions that I require?


  • 1
    Have you set the permissions you'd like at the folder level? Child objects should inherit from their container.
    – iivel
    Sep 23, 2011 at 1:16

1 Answer 1


NTFS permissions 101: On the same drive, Copy inherits; Move retains.

Don't move the files, copy them then delete them. Problem solved.

  • In addition to iivel's comment.
    – TristanK
    Sep 23, 2011 at 4:20
  • Hi I did not realise that so thanks. This works if say copying a file from mu compuer to this folder. But I am using MGET to copy all the files from an FTP folder to ths folder in question where it is not inheriting for whatever reason?
    – Dan Sewell
    Sep 23, 2011 at 13:46
  • 1
    Does the IIS_IUSRS group have read permission at the folder level? Sep 23, 2011 at 18:32
  • which FTP client? (if it uses a temp folder during download and moves the file, and your folder-level permissions are already correct, this might happen).
    – TristanK
    Sep 24, 2011 at 1:39
  • @Daniel Lucus, Yes it does.
    – Dan Sewell
    Sep 24, 2011 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.