Mit Ihrem Befehl erhalte ich dieselbe Fehlermeldung. Aber wenn ich es ändern zu verwenden, RXWD
statt RWXD
es funktioniert:
icacls "D:\wamp\apache\logs" /grant "run_apache":(OI)(CI)RXWD /T
Der Grund dafür ist RXWD
die Kombination der drei Berechtigungen RX
+ W
+ D
.
Die Berechtigungsmasken können durch Eingeben von angezeigt werden icacls /?
:
ICACLS name [/grant[:r] Sid:perm[...]] /grant[:r] Sid:perm grants the specified user access rights. With :r, the permissions replace any previously granted explicit permissions. Without :r, the permissions are added to any previously granted explicit permissions. perm is a permission mask and can be specified in one of two forms: a sequence of simple rights: N - no access F - full access M - modify access RX - read and execute access R - read-only access W - write-only access D - delete access