Grant access to files and folders with icacls

  1. take ownership of files and folders
    Open File Explorer
    right-click on folder and select Properties
    click on Security tab
    Click Advanced button
    At top, next to Owner: click Change
    type Everyone, Click OK
    put check mark in – Replace owner on subcontainers and object, click OK
  2. Open Command prompt
    navigate into same folder
    type – icacls * /grant:r everyone:(oi)(ci)F /t /c

/t – current directory and sub
/c – continue even if there are errors
/grant:r – replace all permissions with Everyone group
(OI) – Object inherit. Objects in this container will inherit this ACE.
(CI) – Container inherit. Containers in this parent container will inherit this ACE.

Leave a comment