Page 1 of 1

[RESOLVED] Adding ACL

Published: October 8, 2018 - 2:34 PM
by Gorenda
Good morning,

I need to add the user group: "identified users" with access and write privileges to a directory.
The problem is that I can't see how.
I didn't see anything about it on WAPT.
Using PowerShell is very complicated...

This command works in a command prompt (CMD):

Code: Select all

run('cacls.exe "C:\Program Files (x86)\sage1000" /C /E /G "utilisateurs authentifiés:C"')
Except my "é" turns into a "?", so it doesn't register it. I haven't been able to figure out how to make an exhaust on this...

Alternatively, does the "copytree2" command allow the ACLs to be preserved during the copy process?

Do you have a solution for performing this type of maneuver?

Thank you in advance

Re: Adding ACL

Published: October 9, 2018 - 7:02 PM
by htouvet

Code: Select all

run(ur'cacls.exe "C:\Program Files (x86)\sage1000" /C /E /G "utilisateurs authentifiés":C')

Re: Adding ACL

Published: October 10, 2018 - 9:45 AM
by dcardon
Hello Gorenda,
htouvet wrote: Oct 9, 2018 - 7:02 PM

Code: Select all

run(ur'cacls.exe "C:\Program Files (x86)\sage1000" /C /E /G "utilisateurs authentifiés":C')
To add to Hubert's answer, I wanted to point out that you should use icacls.exe rather than cacls.exe; cacls.exe is deprecated, and for good reason: it is very buggy.

icacls.exe is not available on winXP, but it can be embedded in the package if needed.

Sincerely,

Denis