Windows commands to check user rights and permissions on files, folders, or system objects

Here are several useful Windows commands to check user rights and permissions on files, folders, or system objects:


📁 Check File/Folder Permissions

1. icacls – View NTFS permissions

icacls "C:\Path\To\FileOrFolder"
  • Shows which users/groups have what rights (e.g., FullControl, Read, Modify).

2. dir /q – View owner of files/folders

dir /q "C:\Path\To\Folder"
  • Lists file owners alongside file details.

👤 Check User Rights and Group Memberships

3. whoami – Show current user info

whoami
whoami /groups
whoami /priv
  • /groups: Shows group memberships
  • /priv: Shows current user’s privileges (e.g., shutdown, backup)

4. net user <username>

net user alice
  • Shows account details, group memberships, and login info.

5. net localgroup

net localgroup Administrators
  • Lists users in a local group.

🔍 Check Effective Permissions

6. Effective Access GUI Tool (Windows Pro/Server)

  • Right-click a file/folder → Properties → Security → Advanced → Effective Access tab.
  • Enter a user to see what rights they truly have (considers inherited permissions too).

🧠 Bonus (PowerShell)

7. Get-Acl (PowerShell)

Get-Acl "C:\Path\To\FileOrFolder" | Format-List
  • More scriptable than icacls.

Would you like a PowerShell script that checks effective permissions for a specific user across multiple files or folders?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top