0

We have an IIS server that has a lot of static HTML files in the folder. We want to restrict access for users. For example, one logged-in user has access only to one special file, another user has access to another special file and hasn't access to all other files. I thought that it can be done via NTFS permissions. I have added Read-Only access rights for user for a specific file, but another user still has access to the same file. If I remove IIS_IUSRS group from NTFS permissions - nobody can't open a file from the IIS web page. So it seems that the IIS_IUSRS group must have access to all folders and files. But how we can restrict access rights? I also tried to add DENY access for users, but no luck

trlhrn
  • 3
  • 2
  • This answer [IIS AppPoolIdentity and file system write access permissions](https://stackoverflow.com/a/5439658/13336642) gives you some light. – samwu Jun 04 '21 at 06:40
  • According to this answer, it seems that it's impossible to restrict access ? Am I right or not? – trlhrn Jun 05 '21 at 07:22
  • It can be done, but you need to configure the appropriate permissions. – samwu Jun 06 '21 at 09:50
  • Could you, please, explain how a can configure permissions? Tried many things in NTFS, but no luck... – trlhrn Jun 06 '21 at 10:30
  • Is there anything you don't understand about the content in the above link? – samwu Jun 07 '21 at 09:37
  • Sorry. but I don't understand how I can restrict access to files according to my question – trlhrn Jun 07 '21 at 12:50

1 Answers1

0

Solved.

  1. Created an ASP.net Core redirector (needed for my purposes);
  2. Published to IIS;
  3. Folder with HTML files moved into the IIS site;
  4. Converted this folder into Application with Win auth;
  5. Changed permissions on each file via PS script (easy than manually) - one file per user.
trlhrn
  • 3
  • 2