Command to list Windows directory permissions
Sometimes we have a requirement to get a list of users and groups who have access to a particular file or folder and we cannot copy and paste the GUI list of security tab. Here we need a command to get the list and we can copy it through the command prompt
Here are 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
- Entra ID (Azure Active Directory): Migration and Integration Guide - 20 December 2024
- Active Directory Federation Services (ADFS): Implementation Guide - 16 December 2024
- Active Directory Backup and Recovery Strategy: Comprehensive Guide - 11 December 2024