How to Find the Owner of a File or Folder Using CMD or PowerShell

Watch the video on YouTube
▶ Watch the video on YouTube

Every file and folder on an NTFS drive has an owner. The owner can always change its permissions. Knowing who owns a file helps when you see “Access denied”, when you’re cleaning up a shared drive, or when files copied from an old PC won’t open.

Here’s how to find the owner from the command line, and with File Explorer if you prefer clicking.

Method 1: dir /q in Command Prompt

  1. Open the Start menu, type cmd and open Command Prompt.
  2. Go to the folder, for example:
    cd /d "D:\Projects"
  3. Run:
    dir /q

The owner appears in a column before each file name, such as PCNAME\Alex or BUILTIN\Administrators. To check one file, use dir /q "report.docx".

Long owner names can be cut off in this view. If that happens, use one of the next methods.

Method 2: Get-Acl in PowerShell

  1. Right-click the Start button and open Terminal.
  2. Run:
    Get-Acl "D:\Projects\report.docx" | Select-Object Owner

To list the owner of every file in a folder:

Get-ChildItem "D:\Projects" | Select-Object Name, @{Name="Owner"; Expression={(Get-Acl $_.FullName).Owner}}

Method 3: icacls for full permissions

icacls shows who has which permissions on a file or folder:

icacls "D:\Projects"

It lists users and their rights, such as (F) for full control and (R) for read. It doesn’t show the owner, but it helps you understand why someone can or can’t open a file.

Method 4: File Explorer

  1. Right-click the file or folder and choose Properties.
  2. Open the Security tab and click Advanced.
  3. The Owner is shown at the top, with a Change link next to it.

Tips

  • Ownership only exists on NTFS drives. USB sticks formatted as FAT32 or exFAT have no owner information.
  • Be careful taking ownership of system folders like C:\Windows. It can break Windows features and updates.

Frequently asked questions

Why does the owner show as a long code starting with S-1-5?

That’s a security ID for an account that no longer exists, often from an old PC or a deleted user. You can take ownership in the Advanced Security Settings if you need access.

Do I need admin rights to see the owner?

Usually not for your own files. For other users’ or system files, run the command as administrator.

Leave a Comment

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