Command to list Windows directory permissions
Sometime we have requirement to get a list of users and groups who have access to particular file or folder and we cannot copy paste the GUI list of security tab. Here we need a command to get the list and we can copy it through command prompt
Here is the command examples to do the job:
D:\>icacls \\servername\folder
\\Servername\public BUILTIN\Administrators:(OI)(CI)(F)
CREATOR OWNER:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
NT AUTHORITY\INTERACTIVE:(OI)(CI)(IO)(M,DC)
NT AUTHORITY\INTERACTIVE:(RX,WD,AD)
NT AUTHORITY\SERVICE:(OI)(CI)(IO)(M,DC)
NT AUTHORITY\SERVICE:(RX,WD,AD)
NT AUTHORITY\BATCH:(OI)(CI)(IO)(M,DC)
NT AUTHORITY\BATCH:(RX,WD,AD)
Everyone:(OI)(CI)(RX)
Successfully processed 1 files; Failed processing 0 files
OR
D:\>icacls C:\folder
\\Servername\public BUILTIN\Administrators:(OI)(CI)(F)
CREATOR OWNER:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
NT AUTHORITY\INTERACTIVE:(OI)(CI)(IO)(M,DC)
NT AUTHORITY\INTERACTIVE:(RX,WD,AD)
NT AUTHORITY\SERVICE:(OI)(CI)(IO)(M,DC)
NT AUTHORITY\SERVICE:(RX,WD,AD)
NT AUTHORITY\BATCH:(OI)(CI)(IO)(M,DC)
NT AUTHORITY\BATCH:(RX,WD,AD)
Everyone:(OI)(CI)(RX)
Successfully processed 1 files; Failed processing 0 file
- Essential Network Ports for Active Directory, DNS, DHCP, and ADFS - 9 September 2024
- Which RSAT Contains Active Directory Users and Computers Windows 11? - 8 September 2024
- Group Managed Service Accounts (gMSA): Benefits, Creation Steps, and Detailed Guide - 8 September 2024