Set the owner of directories and files recursively

If your user account cannot access certain folders or files, you can recursively set the owner.

  • Open a PowerShell terminal with admin rights
  • To set the owner to a specific user account
icacls "C:\THE_TOP_DIRECTORY" /inheritance:e /grant "MY_USER_NAME:(OI)(CI)F" /T
  • To use the owner of the parent directory
icacls "C:\THE_TOP_DIRECTORY" /reset /T

Leave a comment

Your email address will not be published. Required fields are marked *