Folder permission from windows command line

less than 1 minute read

To give all permission in temp folder for every one, run command prompt with admin privilege and then run the following command.

D:\Images> cacls C:\Windows\Temp /t /e /g Everyone:f
processed dir: C:\Windows\Temp
processed dir: C:\Windows\Temp\C9B3A155-BAC8-4CC8-BB43-0E3BE182ABAB-Sigs
processed dir: C:\Windows\Temp\CAVS
processed dir: C:\Windows\Temp\comtypes_cache
processed dir: C:\Windows\Temp\Crashpad
processed dir: C:\Windows\Temp\CR_AD113.tmp
processed dir: C:\Windows\Temp\DiagOutputDir
processed dir: C:\Windows\Temp\Gethelp
processed file: C:\Windows\Temp\GoogleDFSSetup_211015180131_8668.log
processed dir: C:\Windows\Temp\logs
processed file: C:\Windows\Temp\MpCmdRun.log
processed file: C:\Windows\Temp\MpCopyAccelerator.log
processed file: C:\Windows\Temp\MpSigStub.log

Here,

  • /t means “apply change recursively”
  • /e means “edit existing DACL”.

Alternative way
You can try with the following command

C:>icacls "C:\Windows\temp" /grant mahedee:(OI)(CI)F

Here,

  • F= Full Control
  • CI= Container Inherit
  • OI= Object Inherit

Tags:

Categories:

Updated: