Icacls (Integrity Access Control Access List) ist ein natives Programm unter [[Windows]] um alle Access Control Regeln einer Datei bzw eines Ordners aufzuzeigen.
C:\foo\> icacls c:\xampp\apache\bin\httpd.exe
c:\xampp\apache\bin\httpd.exe NT AUTHORITY\SYSTEM:(I)(F)
BUILTIN\Administrators:(I)(F)
BUILTIN\Users:(I)(RX)
* R: Read
* W: Write
* X: Execute
* M: Modify (= RW)
* F: Full Control
* I: Inherit (Berechtigung ist vererbt)
* OI: Object Inherit
* CI: Container Inherit
Man kann ACLs auch bearbeiten
# /T = Recursiv
# /C = Ignore errors
icacls "c:\pfad\zur\datei" DOMAIN\USER:"(OI)(CI)R" /T /C
icacls "c:\pfad\zur\datei" DOMAIN\USER:"(OI)(CI)W"
icacls "c:\pfad\zur\datei" DOMAIN\USER:"(OI)(CI)M" // = RW
icacls "c:\pfad\zur\datei" DOMAIN\USER:"(OI)(CI)F"
Siehe [[https://superuser.com/questions/322423/explain-the-output-of-icacls-exe-line-by-line-item-by-item|Explain output of icacls]] oder [[https://blog.sonnes.cloud/messed-up-ntfs-permissions-how-to-cleanup-and-remove-users-groups-there-should-not-be-there/|Messed up NTFS permissions?]].
Explizite Berechtigungen auf einem Fileserver Share entfernen
icacls "E:\Shares\first_share" /remove "DOMAIN\USER" /T