Using Takeown.exe Command to Take Ownership of a File or Folder

The idea of ownership of a file or folder in Windows 10 or any Windows version for that matter may sound odd for a regular user. You may think that if you own a computer, you own files inside it. Theoretically, that is true. Your computer means your files. But things are a bit different in reality. Sometimes, when trying to change some system files and folders, you may see the following message: You do not currently have permission to access this folder. To deal with that problem, you need to know how to utilize the takeown.exe command in Windows 10.

You can change the owner of a file or folder in Windows using File Explorer. Select a file or folder for which you want to change the owner. Right-click it and select Properties. Go to Security > Advanced > Owner > Change. Also, you can use the built-in console utility takeown.exe. In this article, we will show you how to take ownership of a file or folder from the Command prompt using the takeown command. Of course, to change the owner of a file, you must be the owner or have the administrator’s permissions.

Note. With the takeown command, you can change object ownership and assign it only to the current user or the local administrator group. It does not allow you to specify an arbitrary user or group as the owner of the directory or file.

Takeown.exe Command

Where to find the takeown.exe utility in Windows 10? In Windows 10 and some older versions, the takeown.exe utility “lives” in the C:\Windows\System32 directory. You do not need to specify the full path to it in the Command prompt. The takeown command has the following syntax:

takeown /F <file_name> [/S <RemoteComputerName>] [/U <Domain\DomainUserName>] [/P <UserPassword>] [/A] [/R [/D prompt]]


Parameters of the takeown command:

  • /F <file_name>. Here you must specify the full path to the file or directory whose owner you want to change. You can use the wildcard character *;
  • /S <RemoteComputerName>. You can specify the IP address or the name of the remote computer on which you want to execute the takeown command. By default, the command runs on a local computer (your PC);
  • /U <Domain\DomainUserName> and [/P <UserPassword>. Use that part of the command to specify the credentials of the user under which you want to execute the takeown command;
  • /A. This command gives ownership to the administrators group instead of the current user;
  • /R. Recursively change the owners for all nested files and folders in the specified directory;
  • /D {Y | N}. If the current user does not have permission to view the contents of the directory (list files NTFS permissions,) this parameter specifies whether to change the owner of the file. Y – change the owner, N – skip files.

You can also find the list of all parameters for the takeown.exe utility by typing in the takeown /? command in the Command prompt. You will find brief explanations on how takeown.exe works, plus some examples.

To make things clearer, here are some examples of using the takeown.exe utility to change the ownership of files and folders in Windows 10 (or any modern Windows version.)

To make yourself the owner of, for example, the C:\PS directory, enter the following command:

takeown /F "C:\PS"

takeown command

After executing the command, you will receive a message that you successfully became the owner of particular objects in the specified folder.

Now you can open and manage previously inaccessible folder. If other users access this folder, you need to check and change the NTFS access permissions using the icacls utility or File Explorer.

Assign yourself to own the permissions.log file on the remote computer:

takeown /F "C:\permissions.log " /S

Assign a group of administrators as the owner of all text files in the Windows directory:

takeown /F %windir%\*.txt /A

Assign the ownership to the group of local administrators for all nested files and folders, skip the directories to which the user has access permissions:

takeown /F C:\PS\ /A /R /D Y

Assign the current user as the owner of all *.docx files in a public shared folder on the manfs01 file server:

takeown /S manfs01 /F Public \*.docx

Tip. Do not reassign the owner of the root system folders (C:\Windows, C:\Program Files, etc.) or for the entire system partition; otherwise, you can damage your Windows installation.

How to Quickly Take the Ownership of a File or Folder in Windows 10?

You can use a third-party tool called TakeOwnershipPro to place a dedicated option in the context menu in File Explorer. That utility will provide you a quick and simple way to change the owner of a file or folder in Windows 10 without using complex commands. You can download the app for free from the official website.

I enjoy technology and developing websites. Since 2012 I'm running a few of my own websites, and share useful content on gadgets, PC administration and website promotion.
Cyril Kardashevsky

  1. Access denied memory card. Access denied displayed in a camera. After that windows can’t access the SD card

Leave a Reply

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.