Let users to view and access only their files on Windows shared folder
First thing's first, configure your permissions properly. If you don't want everybody to have read/write access to everything, then don't. You may want to give everybody permissions to create directories at the root of the share and then give "CREATOR OWNER" full access.
After you've dialed in your permissions, turn on access based enumeration in order to prevent users from seeing folders they do not have rights to.
Its similar to setting up folder re-direction or the old roaming profiles. Only the user or admins should be able to access their own roaming folder so do this:
- Set Share Permissions for the Everyone group to Full Control.
- Use the following settings for NTFS Permissions:
- CREATOR OWNER - Full Control (Apply onto: Subfolders and Files Only)
- System - Full Control (Apply onto: This Folder, Subfolders, and Files)
- Domain Admins - Full Control (Apply onto: This Folder, Subfolders, and Files)
- Everyone -
- Create Folder/Append Data (Apply onto: This Folder Only)
- List Folder/Read Data (Apply onto: This Folder Only)
- Read Attributes (Apply onto: This Folder Only)
- Traverse Folder/Execute File (Apply onto: This Folder Only)
Where Everyone can be your security group and add your users to this group
Article reference: Create security-enhanced redirected folder - Windows Server | Microsoft Docs