Why can it be necessary to use `icacls /remove` after applying `icacls /grant:r` in Windows?

  • While icacls /grant:r resets permissions for the specified user, it may not automatically remove other entries, such as «Account Unknown» or unrecognized SIDs.
  • icacls /remove ensures that these unnecessary permissions are explicitly deleted.
    This step is necessary to make sure no unintended or obsolete access control entries remain, ensuring that only the correct permissions are present.