How to use batch file to give a folder permission to the Everyone group

57,289

No need to put :r after /grant. Check the examples by typing icacls /?

Do like this:

icacls "C:\Program Files (x86)\Program File" /grant Everyone:M
Share:
57,289
rangerr
Author by

rangerr

Updated on July 17, 2022

Comments

  • rangerr
    rangerr almost 2 years

    Im trying to add the group Everyone and give it modify permissions on a folder. Im using a batch file to try this. so for I have icacls "C:\Program Files (x86)\Program File" /grant:r Everyone:M But when I go and look at the permissions on the folder nothing has been changed.

  • rangerr
    rangerr almost 10 years
    will this add the permission on the folder? or only on files?
  • Sunny
    Sunny almost 10 years
    It'll provide the permission on Program File folder.
  • rangerr
    rangerr almost 10 years
    So if the Everyone isn't previously on the folder permissions will it add it?
  • Sunny
    Sunny almost 10 years
    Yes, It'll grant MODIFY permission to groupEveryone.