In linux, ls -l lists files permissions, like this:

-rw-r--r--  1 user user      924 2011-07-01 20:23 test.txt

In Windows, commands tree and dir don't have the options to list permissions. How is it possible to list files and their permissions using commandline only?

link|improve this question

50% accept rate
feedback

2 Answers

up vote 5 down vote accepted

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, but does not know about some ACL modes (although it 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
link|improve this answer
feedback

You can use Powershell and the get-acl command

PS C:\> Get-Acl

   Directory:

Path              Owner                            Access  
----              -----                            ------  
C:\               NT SERVICE\TrustedInstaller      Everyone Allow  FullControl

Use it in conjunction with get-childitem (aliased with dir) to get the permissions for the files.

PS C:\> Get-ChildItem | Get-Acl

Or, using the alias:

PS C:\> Dir | Get-Acl
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.