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
- Active Directory Troubleshooting Master Guide - 4 December 2024
- Active Directory Security Groups: Management and Best Practices - 2 December 2024
- Active Directory Password Policy Implementation Guide - 26 November 2024