Use icacls:
> icacls Music
Music SNOW\grawity:(I)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
SNOW\grawity:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
The older cacls tool is the only choice on Windows XP [although you can copy icacls.exe
from Server 2003]. cacls does not know about some ACL modes, but displays most of them fine.
> cacls Music
F:\Users\Mantas\Music SNOW\grawity:F
CREATOR OWNER:(OI)(CI)(IO)F
SNOW\grawity:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:(OI)(CI)F
In both outputs, (OI)
means "object inherit" (files will inherit this ACE), (CI)
is "container inherit" (containers – i.e. folders – will inherit this ACE), (IO)
is "inherit only".
Microsoft also used to provide an xcacls tool separately, but its functionality is now part of icacls.
%~aX
, if it's in batch? It's liked----------
.