Wednesday, 16 August 2017

ntfs - Give access to a subdirectory without giving access to parent directories


I have a scenario involving a Windows file server where the "owner" wants to dole out permissions to a group of users of the following sort:



  • \\server\dir1\dir2\dir3: read, write and execute

  • \\server\dir1\dir2: no permissions

  • \\server\dir1: no permissions

  • \\server: read and execute


To my understanding (Update: This entire paragraph is wrong!), it is not possible to do this because Read & Execute permission must be granted to all the parent directories in a directory chain in order for the operating system to be able to "see" the child directories and get to them. Without this permission, you can't even obtain the security context token when trying to access the nested directory, even if you have full access to the subdirectory.


We are looking for ways to get around this, without moving the data from \\server\dir1\dir2\dir3 to \\server\dir4.


One workaround I thought of, but which I am not sure if it will work, is creating some sort of link or junction \\server\dir4 which is a reference to \\server\dir1\dir2\dir3. I am not sure which of the available options (if any) would work for this purpose if the user does not have Read & Execute permission on \\server\dir1\dir2 or \\server\dir1, but as far as I know, the options are these:



  • NTFS Symbolic Link,

  • Junction,

  • Hard Link.


So the questions:



  • Are any of these methods suitable to accomplish my goal?

  • Are there any other methods of linking or indirectly referencing a directory, which I haven't listed above, which might be suitable?

  • Are there any direct solutions that don't involve granting Read & Execute to \\server\dir1 or \\server\dir2 but still allowing access to \\server\dir1\dir2\dir3?



Answer



You are mistaken in your original assumption, which renders the rest of your question moot.


The minimum permission that a user would need on dir1 and dir2 is Traverse Directory. This will most likely be problematic to your users, though - so I would recommend Traverse Directory and List Folders. They will be able to navigate through the top two directories and get to dir3 where they have more permissions, but will not even see what files exist in the top two directories.


Permissions like Read & Execute and Modify are just collections of individual permissions. They're the first thing you see, because they're the most commonly used. If you need to get very granular (like this situation), click the Advanced button and dig into the options listed there.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...