Alright so one of our customer’s shared drive broke, we were able to restore it and such, however the needed rights were gone. I found a cool nifty tool called “SubInACL” to help me out. The default install is in

C:\Program Files (x86)\Windows Resource Kits\Tools

The syntax for SubInCAL is like so:

SUBINACL /<service> \\MachineName\FOLDER\* /GRANT=[DomainName\]UserName[=Access]

So in my case I used:

subinack /file D:\Data\* /grant=system=F
subinack /file D:\Data\* /grant=<domainname>\<username>=F

The parameter follows this list:

F : Full Control
R : Generic Read
W : Generic Write
X : Generic eXecute
L : Read controL
Q : Query Service Configuration
S : Query Service Status
E : Enumerate Dependent Services
C : Service Change Configuration
T : Start Service
O : Stop Service
P : Pause/Continue Service
I : Interrogate Service
U : Service User-Defined Control Commands

To get all the sub-directories you can use the switch ‘/subdirectories

Such an easy command saved the day!