I'd like to create a user account on a Windows Server which can read whatever bits of C:\
it needs to be able to execute programs, but have no read access to D:\
except for D:\Special
.
It seems that the only sane way of achieving the former is to make this user part of the Users
group. Unfortunately that also gives the user read access to all of D:\
. If I add a Deny rule for D:\
, however, this rule also applies to D:\Special
, and it seems to be impossible to override by design.
Is there any way to do what I want, namely the "usual" Users
access to C:\
, but on D:\
no access except for read access to D:\Special
?
Your content on D:\ should not be available to "Users" since a newly created user is put into this group by default. Just remove the "Users" and "Everyone" entries from D:\ and all subdirectories - do not use "deny" type ACEs as they effectively will deny access for everyone who is the member of "Users", even if the user would otherwise have been granted access by the other defined ACEs.
It depends on your requirements. Technically, a user does not need any permissions granted on the parent directory to access a subdirectory. But if you need the user to be able to do the clickety-navigation through Windows Explorer, it obviously will be a problem if the parent directory cannot be listed. Your options here:
D:\special
and remove access for D:\, then create either a shortcut, a mapping or a symlink there so the user would not have to navigate through D:\ to accessspecial
D:\special
and only grant the "List Folder Contents" permission to the user/group in question without inheritance. This way the user will be able to list the entire directory, but not open any of the files or subdirectories.If the file or directory names in D:\ are not exposing something confidential, the second approach is to be preferred since it is more "organic" and works better for the user's and application programmer's expectations.
Edit: since TomTom has expresses some concerns about whether method #1 is really going to work, here is a short screencap demo from my Windows system (sorry, the output's German, but the idea should be apparent nonetheless)
No, because one needs to access D:\ in order to access D:\Special. Whoever came up with that idea left his common sense at the door before planning.
This simply is not possible and has nothing to do with windows - it is the same in any hierarchical file system. A folder in anotehr folder can not be accessed without any access to the root folder.