Hi,
I have implemented a mechanism to generate and execute a batch script from a user's request to set access rights for a shared folder on a file server which I maintain.
In the current specification, commands are executed in the following order.
icacls folder /reset /t /c /q
icacls folder /inheritance:d /t /c /q
icacls folder /grant /t /c /q group A, group B
However, running in this order does not add Group A and Group B to the permissions of some subfolders and files stored there (but not all).
It looks like only the first /reset and /inheritance:d are applied.
So I searched for information on the internet and changed the order of issuing commands as follows.
icacls folder /reset /t /c /q
icacls folder /grant /t /c /q group A, group B
icacls folder /inheritance:d /t /c /q
With this, permissions are set successfully on subfolders and files below them when I run the scripts in this order.
So my question is, is this a normal behavior of icacls command?
I look forward to hearing your opinions.