2

I need the same effect of the checkbox "Replace all child object permission entries with inheritable permission entries from this object" (directory->Properties->advanced in Windows Explorer) from the command line instead.

This is the GUI (see the highlighted checkbox)

enter image description here

Thanks!

2 Answers 2

4

Thanks to @optichip for the help! he definitely pointed me in the right direction.

This was the command I was looking for:

icacls "C:\MyPath" /reset /T /C
1
  • i tried the above command but id doesn't worked
    – chandu
    Sep 2, 2021 at 14:47
0
icacls "C:\Program Files (x86)\Windows Media Player" /grant Administrators:(OI)(CI)M
icacls "C:\Program Files (x86)\Windows Media Player\*" /grant Administrators:(OI)(CI)M

This will set Modify on the folder, and it will also push Administrators group down into the folders underneath it. You can get more command information doing icacls /? from the command line.

2
  • Thanks for your answer, but these commands will esplicitely set the permissions on the objects. As I stated, I need to activate inheritance from the parent instead. Dec 31, 2014 at 2:23
  • 1
    Thought you wanted to push down the highlighted entry... So you are fine with what's there, you just want to enable inheritance? You can do this with icacls [folder] /inheritance:e /t
    – Optichip
    Dec 31, 2014 at 2:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .