Deny Folder delete the folder only

  • Thread starter Thread starter nrothwell
  • Start date Start date
N

nrothwell

Guest
Hi, with the below, when I try to access the subfolder it will no allow me unless I run to replace all child object permission entries with inheritable permission entries from this object on each folder


what I am doing wrong, please help

what I would like to do is:

Trying to update and add permission to 1000 folders so the users cant more or delete them, and can have modify & access within the subfolders The top folder Test will have ready only access, subfolders (New Folders ) will have, modify this folder, subfolder and files on a Security group & Deny Delete on this folder only


7b87faee-7199-43cb-a50f-42342f0f11d6?upload=true.png



$Domain="domain"

$Group="Data Drive Access"

$UD = $Domain +"\"+ $Group



$Domain2="domain"

$Group2="Data Drive Access (Deny Delete-Move)"

$UD2 = $Domain2 +"\"+ $Group2



#Domain Use format domain\username or domain\group



# Take Ownership

takeown /f $StartingDir /r



$StartingDir="D:\Shares\Data\Test\*"

#Location of Directoy



#icacls $StartingDir /grant:r "$($UD):(D)"

icacls $StartingDir /q /c /t /reset

icacls $StartingDir /grant:r "$($UD):(OI)(CI)M"

icacls $StartingDir /deny "$($UD2):(D)" /t

icacls $StartingDir /q /c /t





I have also ported this on spiceworks, as I tried using $acl.SetAccessRule($rule) and $acl.AddAccessRule($ruleAdd), ran into another problem.

o why won't this work



https://community.spiceworks.com/to...ly-seems-to-inherit-into-subfolders-and-files

Continue reading...
 
Back
Top