View NTFS Permission


Following are few common Windows command line NTFS permission checking tools preinstalled with operating system.  Helpful for files /folders permission auditing, modifications etc.

Following Tools works on natively win7, win2003/3008.

#icacls
Examples:

icacls c:\windows\* /save AclFile /T
– Will save the ACLs for all files under c:\windows
and its subdirectories to AclFile.

icacls c:\windows\ /restore AclFile
– Will restore the Acls for every file within
AclFile that exists in c:\windows and its subdirectories.

icacls file /grant Administrator:(D,WDAC)
– Will grant the user Administrator Delete and Write DAC
permissions to file.

icacls file /grant *S-1-1-0:(D,WDAC)
– Will grant the user defined by sid S-1-1-0 Delete and
Write DAC permissions to file.

PS C:\Users\userA> icacls d:\test
d:\test NT AUTHORITY\SYSTEM:(OI)(CI)(F)
Domain\userA:(OI)(CI)(F)
Domain\userB:(OI)(CI)(F)
BUILTIN\Administrators:(OI)(CI)(F)
Domain\UserC:(OI)(CI)(RX)

Successfully processed 1 files; Failed processing 0 files

#CACLS

C:\Users\UserA\cacls e:\tmp
e:\TMP BUILTIN\Administrators:F
BUILTIN\Administrators:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
NT AUTHORITY\Authenticated Users:C
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)C
BUILTIN\Users:R
BUILTIN\Users:(OI)(CI)(IO)(special access:)
GENERIC_READ
GENERIC_EXECUTE

#GET-ACL
Windows 2008 – PowerShell

c:\PS> Get-Acl d:\test | Format-List
(Note: d:\test is a folder)

Path   : Microsoft.PowerShell.Core\FileSystem::D:\test
Owner  : Domain\userA
Group  : Domain\Domain Users
Access : NT AUTHORITY\SYSTEM Allow  FullControl
BUILTIN\Administrators Allow  FullControl
Domain\UserB Allow  FullControl
Domain\UserA Allow  FullControl
Domain\UserC Allow  ReadAndExecute, Synchronize
Audit  :
Sddl   : O:S-1-5-21-103067618-608969892-622754261-1743G:DUD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;S-1-5-21-10
3067618-608969892-622754261-1611)(A;OICI;FA;;;S-1-5-21-103067618-608969892-622754261-1743)(A;OICI;0x1200a9;;;S
-1-5-21-103067618-608969892-622754261-4032)

Advertisements

About Robiul

Robiul has 15 years of continuous successful career experience in ICT with extensive background in System Engineering, IT infrastructure design, operations and service delivery, managing IT projects / MIS functions for local and multi-national companies with in-depth knowledge of multiple operating systems as well as construct / manage small to medium size Data Center. Proven ability to design and implement medium to semi-large scale LAN/WAN/WLAN and system infrastructures. Academic qualification: Master of Science in Information Systems. Professional certifications are: MCSE, CCNA, ITIL and FoundStone Security Professional, VCP, NetAPP, CISSP etc.
This entry was posted in Windows and tagged . Bookmark the permalink.