Take ownership file windows 10

В ситуации, когда какие-либо папки или файлы в Windows 11 или Windows 10 не удаляются, не переименовываются и не изменяются иным образом, возможных причин для этого обычно две: файл занят другим процессом либо у текущего пользователя, в том числе с правами администратора, недостаточно прав для изменения этого файла.

Во втором случае вы можете стать владельцем файла или папки вручную, либо, если подобную задачу требуется выполнять часто — добавить соответствующую опцию в контекстное меню этих элементов, о чем и пойдет речь в этой статье.

Easy Context Menu — просто и эффективный способ добавить пункт «Стать владельцем» для папок и файлов

Easy Context Menu — простая бесплатная программа для редактирования контекстным меню в Windows 11 и Windows 10, обзор утилиты уже публиковался на сайте. Одна из возможностей — добавление пункта «Стать владельцем» в контекстные меню файлов и папок. Шаги будут следующими:

  1. Скачайте утилиту с официального сайта разработчика (ссылки на загрузку внизу страницы). Запустите программу в нужной разрядности и, при необходимости, включите русский язык интерфейса в меню Options — Languages.
  2. В разделах «Контекстное меню папок» и «Контекстное меню файлов» отметьте пункты «Стать владельцем».
  3. В меню «Файл» выберите пункт «Применить изменения».

В результате в контекстных меню файлов и папок по правому клику мышью появится пункт «Стать владельцем». Внимание: в Windows 11 потребуется нажать «Показать дополнительные параметры» в «первом» контекстном меню, либо сделать так, чтобы система всегда показывала классическое контекстное меню.

Само действие изменения владельца и предоставления прав текущему пользователю выполняется механизмом самой программы: после выбора «Стать владельцем» вы увидите информацию о прогрессе в виде уведомления в нижнем правом углу рабочего стола.

Пункт стать владельцем добавлен

Есть и другие программы, позволяющие добавить аналогичную функциональность в контекстные меню, одна из популярных — TakeOwnershipPro.

TakeOwnershipEx

TakeOwnershipEx — ещё одна бесплатная утилита, позволяющая добавить пункт контекстного меню, который меняет владельца папки, файла или диска и предоставляет полный доступ к нему для группы «Администраторы».

Получить полный доступ в контекстном меню с помощью TakeOwnershipEx

Интересная особенность программы — повторное использование этого же пункта меню возвращает исходные разрешения для выбранного элемента файловой системы, что может быть полезным в некоторых случаях. Подробно об утилите: Использование TakeOwnershipEx для получения полного доступа к папке, файлу или диску в Windows.

Путем добавления записи в реестр

Следующая возможность — использование реестра для добавления пункта «Стать владельцем» в контекстные меню файлов и папок. Достаточно создать reg-файл (кодировка ANSI при использовании блокнота) со следующим содержимым:

Windows Registry Editor Version 5.00


[-HKEY_CLASSES_ROOT\*\shell\TakeOwnership]
[-HKEY_CLASSES_ROOT\*\shell\runas]

[HKEY_CLASSES_ROOT\*\shell\TakeOwnership]
@="Стать владельцем"
"Extended"=-
"HasLUAShield"=""
"NoWorkingDirectory"=""
"NeverDefault"=""

[HKEY_CLASSES_ROOT\*\shell\TakeOwnership\command]
@="powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l' -Verb runAs\""
"IsolatedCommand"= "powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l' -Verb runAs\""


[HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership]
@="Стать владельцем"
"AppliesTo"=""
"Extended"=-
"HasLUAShield"=""
"NoWorkingDirectory"=""
"Position"="middle"

[HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership\command]
@="powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" /r /d y && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l /q' -Verb runAs\""
"IsolatedCommand"="powershell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/c takeown /f \\\"%1\\\" /r /d y && icacls \\\"%1\\\" /grant *S-1-3-4:F /t /c /l /q' -Verb runAs\""



[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="Стать владельцем"
"Extended"=-
"HasLUAShield"=""
"NoWorkingDirectory"=""
"Position"="middle"
"AppliesTo"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\\\" /r /d y && icacls \"%1\\\" /grant *S-1-3-4:F /t /c"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\\\" /r /d y && icacls \"%1\\\" /grant *S-1-3-4:F /t /c"

Затем «Запустить» файл и согласиться с добавлением данных в реестр.

Добавить данные в реестр

Пункт «Стать владельцем» будет добавлен в контекстное меню (в Windows 11 потребуется перейти в «Показать дополнительные параметры»).

В этом варианте действия по смене владельца и предоставления необходимых прав пользователю будут производиться средствами командной строки, аналогично тому, как это выполняется вручную.

Если в дальнейшем вам потребуется убрать созданный пункт «Стать владельцем» из реестра, используйте следующий код reg-файла:

Windows Registry Editor Version 5.00


[-HKEY_CLASSES_ROOT\*\shell\TakeOwnership]

[-HKEY_CLASSES_ROOT\*\shell\runas]

[-HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership]

[-HKEY_CLASSES_ROOT\Drive\shell\runas]

В некоторых случаях применение «Стать владельцем» может привести к неполадкам в работе системы (или не сработать), в частности для:

  • Защищенных системных папок.
  • Системного диска с текущей системой (по умолчанию владельцем для него является TrustedInstaller и есть ограничения на работу с корневым каталогом для обычных пользователей).
  • Папок антивирусов (правильный вариант — использовать встроенные деинсталляторы или утилиты удаления от разработчика антивируса).

И во всех случаях для выполнения как описанных изменений контекстного меню, так и для самого действия «Стать владельцем» вам потребуются права администратора на компьютере.

Taking ownership of a file or folder in Windows means becoming its primary controller. It allows you to assume full control over files or folders that are restricted due to permission settings.

In this guide, we will walk you through the straightforward ways on how to add a “Take Ownership” option to the right-click context menu in Windows 10 and 11. This is particularly useful if you’ve been encountering some common ownership issues, such as needing to modify system files for troubleshooting but can’t, accessing files from an old Windows installation, or inheriting files from another system and lacking the necessary permissions.

How to take file ownership in Windows 10

The simplest way to add “Take Ownership” to the right-click context menu in Windows 10 and 11 is by modifying the Windows Registry.

Step 1: Open the Registry Editor

  1. Simultaneously press Win + R to open the Run dialog box.
  2. Type regedit and press Enter
    Open Run dialog box and type Regedit

Step 2: Navigate to the Context Menu Registry Key

  1. In the Registry Editor, navigate to the following key: HKEY_CLASSES_ROOT\*
    Registry window navigate to : HKEY_CLASSES_ROOT\*

  2. For adding the option to folders instead of files, navigate to: HKEY_CLASSES_ROOT\Directory
    Registry Editor window and navigate to : HKEY_CLASSES_ROOT\Directory

Step 3: Create a new registry entry

  1. Right-click on the shell key inside the selected path.
  2. Choose New > Key and name it TakeOwnership.
    Registry Editor window, Right-click on the shell key inside the selected path and Choose New data-lazy-src=

  • Inside TakeOwnership:
    1. Create a new String Value named “MUIVerb”
    2. Set its value to Take Ownership.
  • Create another String Value named “Icon” and set its value to imageres.dll, -78 (This is an optional step intended to modify the icon display).
  • Create a new key inside TakeOwnership and name it command.
  • Set the Default value of command to the following:
    • cmd.exe /c takeown /f “%1” /r /d y && icacls “%1” /grant administrators:F /t /c /l /q
  • Close the Registry Editor.
  • Step 4: Restart Windows Explorer

    1. Open Task Manager.
    2. Locate Windows Explorer in the Processes tab.
    3. Right-click the process and select Restart.
    4. Right-clicking a file or folder should display the “Take Ownership” option.

    How to remove “Take Ownership” from the context menu

    Despite its many advantages, taking ownership of files and folders is not always safe. This is why the default option in all Windows devices is to limit permissions to maintain system integrity and user privacy. It makes sense when you consider that granting ownership rights too easily can lead to accidental system modifications.

    Adding “Take Ownership” to the context menu grants multiple users to have access to a system. While this can improve collaboration, it also increases the risk of someone misusing the feature.

    To remove Take Ownership from the context menu:

    1. Open the Registry Editor by prompting the regedit command through the Run dialog box.
    2. Navigate to the “HKEY_CLASSES_ROOT\*\shell\TakeOwnership” key.
    3. Right-click on the TakeOwnership key and select Delete.
    4. Confirm deletion.
    5. Restart Windows Explorer, as described in the previous instructions.

    Alternative methods to take ownership of files

    There are three other ways to take full ownership of files. While we will describe them below, be aware that the Windows Registry option is still the most efficient way to perform this action. That said, if you encounter problems with that option, there are other methods to consider:

    Option 1: Using Command Prompt

    ⚠️ Note: Make sure that you open Command Prompt as an Administrator. Even so, there are some operations that even an Admin cannot carry out in its entirety.

    1. Open Command Prompt.
    2. Type the following command:
      •  takeown /f foldername /r /d y (Replace foldername with the specific folder you want to take ownership of.)
    3. Run the command: 
      • if you only want to give ownership to a specific user in the system, the command is: icacls foldername /grant %username%:F /t /q 
      • If you want to give full permission to the Administrator, the command would be: icacls full_folder_path /grant administrators:F /t 

    Option 2: Using PowerShell

    To take ownership using PowerShell, use the following command.

      • takeown /f “C:\Path\To\Your\FileOrFolder” /r /d y 

    Replace FileOrFolder with the specific file path.

    You can also use access control lists (ACLs) in Windows to define permissions attached to files. PowerShell provides the cmdlets “Get-ACL” and “Set-ACL” to manage these lists.

    1. Retrieve the current ALC: $acl = Get-ACL “C:\path\to\your\file.txt”
    2. State the new owner with the following command. Replace YourDomain \YourUsername with the relevant information.
      • $principal = New-Object System.Security.Principal.NTAccount(“YourDomain\YourUsername”)
    3. Set the new owner:
      • $acl.SetOwner($principal)
      • Set-Acl “C:\path\to\your\file.txt” $acl

    To take ownership of multiple files, you would use the ‘ForEach-Object’ cmdlet. For example, if you want to take ownership of all files within a folder, you would execute the command:

      • Get-ChildItem “C:\path\to\your\folder” | ForEach-Object { takeown /f $_.FullName }

    Option 3: Changing folder properties

    1. Go to the desired file or folder and right-click on it.
    2. Select Properties.
    3. Go to Security tab, and click the Advanced button.
      Go to any Desired file or folder and right-click on it. Select Properties. Go to Security tab, and click the Advanced button.

    4. Click on the Change button next to Owner. This will open a new window.
      Click on the Change button next to Owner

    5. Write Administrator in the Enter the object names to select form, and then click on Check Names. Press Ok to proceed.
      ⚠️ You should see the Owner changed to the initial name of your administrative account. 
    6. Click on Replace owner on sub containers and objects, then Apply. End by pressing Ok. You should receive a notification once ownership has been changed. Simply press Ok to close this window.

    Troubleshooting issues with taking ownership

    Occasionally, you will encounter issues when taking ownership of the context menu in Windows. This usually occurs when you use other methods aside from the Windows Registry. Below are some common issues you may experience, with suggested solutions.

    Issue: “Access Denied” even after taking ownership

    This issue occurs when ownership alone does not grant full permissions. After taking ownership, make sure that you explicitly grant yourself Full Control in the Security tab. If this still doesn’t work, try opening the file or folder using Safe Mode. Check out this guide, How to Start Safe Mode with Windows Command Prompt, for more information.

    Issue: “Take Ownership” option is missing from the context menu

    If you cannot see the “Take Ownership” option after following the modification steps, try restarting Windows Explorer or your device itself. This applies the changes to your device. If this still doesn’t resolve the issue, check for system policy restrictions that may prevent changes to the context menu.

    Issue: File is still locked after taking ownership

    This happens when files or folders are actively used by Windows processes. To resolve this, reboot your computer in Safe Mode and attempt changes. In the worst-case scenario, you may have to perform a system restore to revert to default configurations; however, keep in mind that a full system restore will affect all changes, including those that are working.

    Best practices for managing file ownership

    Only modify system files when necessary

    System defaults are defaults for a reason. Changing system file ownership without proper justification can lead to potential security vulnerabilities.

    Always create backups

    As a redundant layer, make sure that you back up your files before modifying file permissions. This is a crucial action to take, especially for business-critical files.

    Be selective when applying “Take Ownership”

    Take particular care when applying “Take Ownership” to multiple files – especially if you are using PowerShell or Command Prompt. This can lead to unintended behavior.

    Check for running processes

    Take note that Take Ownership may not work if a file is actively being used.

    Restore permissions when finished

    If you are only taking ownership for troubleshooting purposes, make sure to revert to default settings once you’re finished.

    Frequently Asked Questions (FAQs)

    Does taking ownership affect system security?

    Yes, especially if you change permissions on critical system files. Even with the best solutions, consider that some files are protected for a reason. Unless you absolutely need to take ownership, modifying files can accidentally leave your system vulnerable to threat actors.

    Can I take ownership of system files without affecting Windows updates?

    Taking ownership of system files can sometimes affect Windows updates, as the system expects default permissions to remain intact. It’s a good idea to revert permissions on critical system files to minimize the risk of faulty updates.

    What happens if I take ownership of an entire drive?

    It is never recommended to take ownership of an entire drive. Doing so can lead to unintended access control issues, especially if system files and application data are affected. We recommend doing this only for troubleshooting and reverting to default permissions once done.

    Can I use this method on external drives or network folders?

    Yes, but with limitations. You can take ownership of files on external drives as long as they are formatted with NTFS. This is because FAT32 and exFAT do not support Windows ownership and permissions. For network folders, taking ownership may not work if the files are managed by a different system of domain administrators. For such cases, permission changes need to be made on the host system.

    How do I restore default permissions after taking ownership?

    To restore default permissions, you need to reset the original owner and access control settings. You can follow the instructions as listed above for more information.

    The importance of “Take Ownership”

    There are specific use cases when you must take file ownership in Windows 10, such as troubleshooting files. The process is straightforward, but keep in mind that there are security risks involved. It is always a good practice to revert to default permissions once you’ve accomplished your intended purpose.

    You are here:
    Home » Windows 10 » Add “Take Ownership” To Right-Click Menu In Windows 10

    Generally speaking, a user needs to take ownership of a file in the Windows operating system before renaming, editing, and deleting protected operating system files.

    Unfortunately, like its predecessors, Windows 10 also doesn’t offer an easy way to take ownership of files. While it’s possible to take ownership of files from GUI and Command Prompt, the procedure is not straight-forward.

    If you often need to take ownership of files to edit, modify or delete files, adding Take ownership option to the file right-click menu or file context menu is a good idea. By adding Take ownership option to the right-click menu, you can take ownership of files in a few seconds.

    Add take ownership to right click menu Windows 10

    In order to add Take ownership option to the right-click menu in Windows 10, you need to make a couple of changes to the Windows Registry. Since not all users are comfortable with manually editing the Registry, we are providing a ready-to-use Registry file that you can merge to easily make necessary changes to the Windows Registry and add Take ownership option to the file context menu of Windows 10.

    Add Take ownership to file/folder context menu in Windows 10

    Follow the given below directions to add Take ownership option to the file context menu in Windows 10.

    Step 1: Click here to download Take Ownership.zip file. Extract the downloaded zip file to get Install Take Ownership.reg and Uninstall Take Ownership.reg files.

    Add take ownership to right click menu Windows 10 pic1

    Step 2: Right-click on Install Take Ownership.reg file and then click Merge option.

    Add take ownership to right click menu Windows 10 pic2

    Step 3: Click the Run button if you see the following file security warning.

    Add take ownership to right click menu Windows 10 pic3

    Step 4: Next, you will get the User Account Control prompt where you need to click the Yes button to continue.

    Step 5: When you see the Registry Editor dialog, click the Yes button to add the information to Registry.

    Add take ownership to right click menu Windows 10 pic4

    Step 6: Finally, click the OK button.

    Add take ownership to right click menu Windows 10 pic5

    Step 7: You should now see Take Ownership option when you right-click on a file or folder in Windows 10. If not, restart the Windows Explorer or restart your PC once. You should now see Take ownership option whenever you right-click on a file in Windows 10.

    Remove Take ownership option from the file context menu

    To remove Take Ownership option from file/folder context menu, please merge the Uninstall Take Ownership.reg file included in Take Ownership.zip file that you downloaded in the first step of this guide.

    Take ownership of a file/folder

    To take ownership of a file, right-click on a file, click Take ownership option, and click Yes button when you see the UAC prompt.

    TakeOwnershipEx is a free tool out there to quickly take ownership of files in the Windows operating system.

    Sometimes you need to get full access to some file or folder in Windows 10. It can be a system file or folder, or one which was created by a user account that no longer exists. In most cases, the Windows operating system will prevent you from doing any operation on such files and folders. In this article, we will see how to take ownership and get full access to files and folders in Windows 10.

    Take ownership of a file or folder in Windows 10 using File Explorer

    To take ownership of a file or folder in Windows 10 without using third party tools

    1. Open File Explorer, and then locate the file or folder you want to take ownership of.
    2. Right-click the file or folder, click Properties, and then click the Security tab.
      Windows 10 take ownership 1

      Windows 10 take ownership 2

    3. Click the Advanced button. The «Advanced Security Settings» window will appear. Here you need to change the Owner of the key.
      Click the Change link next to the «Owner:» label
      Windows 10 take ownership 3

    4. The Select User or Group window will appear.
      Windows 10 take ownership 5

      Select the user account via the Advanced button or just type your user account in the area which says ‘Enter the object name to select’ and click OK.

    5. Optionally, to change the owner of all subfolders and files inside the folder, select the check box «Replace owner on subcontainers and objects» in the «Advanced Security Settings» window. Click OK to change the ownership.
      Windows 10 take ownership 6 owner subcontainers

    6. Now you need to provide full access to the file or folder for your account. Right-click the file or folder again, click Properties, and then click the Security tab.
    7. Click the Add button. The «Permission Entry» window will appear on the screen:
      Windows 10 take ownership 7 permission for entry

    8. Click «Select a principal» and select your account:
      Windows 10 take ownership 8 select principal

    9. Set permissions to «Full control»:
      Windows 10 take ownership 9 full control

      Click OK.

    10. Optionally, click «Replace all existing inheritable permissions on all descendants with inheritable permissions from this object» in the «Advanced Security Settings» window.
      Windows 10 take ownership 10 full access

      What it means is permissions on this parent object will replace those on its descendant objects. When cleared, permissions on each object, whether parent or its descendant, can be unique. Click OK to get full access to the file or folder.

    That’s it. You just changed the ownership and got full access to the file in Windows 10 using the File Explorer app.

    See: How to restore the TrustedInstaller ownership in Windows 10

    Additionally, you may want to add a Change Owner context menu. It will allow you to save significant amount of time by directly setting ownership to one of the pre-defined system accounts.

    Change Owner Context Menu

    The context menu allows you to quickly change the owner to one of the following system accounts:  the Administrators group, Everyone, SYSTEM, and TrustedInstaller.  To learn more about the Change owner context menu, please refer to the following post.

    How to Add Change Owner Context Menu in Windows 10

    There, you will find ready-to-use Registry files, detailed instructions, and clarifications about how every context menu entry works. This will allow you to change the file, folder, or drive owner with one click.

    Take ownership of a file or folder in Windows 10 using TakeOwnershipEx

    Alternatively, you can save a lot of your time using my freeware, TakeOwnershipEx. It allows you to change file ownership and access rights with one click. Just select the file or a folder and click the «Take Ownership» button:

    Windows 10 take ownership 11 toex

    Windows 10 take ownership 12 toex

    After you get full access to the desired file or folder, you can even restore the default permissions which it had. Click the «Restore ownership» button to restore it:

    Windows 10 take ownership 12 restore toex

    That’s it. Using the TakeOwnershipEx app, you can save your time, but even if you prefer using the built-in options in File Explorer, it shouldn’t be too hard task for you if you followed the instructions in this article.

    Support us

    Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

    If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!

    Windows 10’s file system can be used to to assign permissions to specific groups and users to access files and folders on a computer.

    When you’re signed in to your Windows 10 account, you get full control over the files and folders you create, sometimes you may also need access to other files. It could be files from an old account from a user that’s no longer around, or maybe some system files you need to tweak edit to customize certain aspects of the operating system.

    If you don’t have specific permissions, Windows 10 will deny you access. But if your account has administrative privileges, you can take ownership of certain files and folders on your computer.

    In this guide, we’ll walk you through the steps to take ownership of files and folders on your Windows 10 PC without the need of a third-party tool.

    How to take ownership of files and folders

    1. Open File Explorer.
    2. Browse and find the file or folder you want to have full access.
    3. Right-click it, and select Properties.
    4. Click the Security tab to access the NTFS permissions.
    5. Click the Advanced button.

    1. On the «Advanced Security Settings» page, you need to click the Change link, in the Owner’s field.

    1. Click the Advanced button.
    2. On the «Select User or Group» page, click the Find Now button.
    3. From the search result, select your user account, and click OK.

    1. On the «Select User or Group» page, click OK.
    2. Click Apply.
    3. Click OK.

    1. Click OK again.
    2. Click OK one more time to complete this task.

    It’s important to note that if you’re taking ownership of a folder, you can check the Replace ownership on subcontainers and object option in the Advanced Security Settings page to take control of the subfolders inside of the folder.

    Now you’ll need to grant full access control to your account, to do this use the following steps:

    1. Right-click the file or folder and select Properties.
    2. Click the Security tab to access the NTFS permissions.
    3. Click the Advanced button.
    4. Under the Permissions tab, click Add.

    1. Click Select a principal to add your user account.
    2. On the «Select User or Group» page, click the Find Now button.
    3. From the search result, select your user account, and click OK.
    4. On the «Select User or Group» page, click OK.

    1. On «Permission Entry», check the Full control option.
    2. Click OK.

    1. Click OK.
    2. Click Apply.
    3. Click OK.
    4. Click OK to close the file or folder properties to complete the task.

    It’s important to note that if you’re taking ownership of a folder, you can check the Replace all existing inheritable permissions on all descendants with inheritable permissions for this object option in the Advanced Security Settings page to replace the subfolders permissions with the settings from the parent folder.

    All the latest news, reviews, and guides for Windows and Xbox diehards.

    More Windows 10 resources

    For more help articles, coverage, and answers on Windows 10, you can visit the following resources:

    • Windows 10 on Windows Central – All you need to know
    • Windows 10 help, tips, and tricks
    • Windows 10 forums on Windows Central

    Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.

    Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии
  • Планировщик дня для windows 10
  • Windows поверх mac os
  • C users user appdata local microsoft windows explorer
  • Где находятся файлы игр в windows 7
  • Jungo windriver windows 10