Error applying security settings windows 10. Error applying security settings. How to change the owner of a folder and a file. Adding a cascading menu with change ownership options on the current user and on TrustedInstaller

Consider a situation where an attempt to change the NTFS permissions of a folder or file causes a security application error:

Error applying security settings to: drive:\Folder name\file name Failed to enumerate objects in container. Access denied

In order to set new permissions for such an object, you need to change the owner.

Why does this happen

Such an effect can be obtained if, for example:

  • you copied\moved files from another computer;
  • connected someone else's hard drive;
  • reinstalled the system.

The essence is the same: your account or the group it belongs to does not have access rights to change the object's security settings.

How to change the owner of a folder or file

Let's say we have a folder c:\temp and we can't change the file security settings inside it:


What should be done:

1. Call the properties of the folder.

2. Click the tab Safety.

3. Press the button Additionally:


5. Click Additionally:


6.Search:

7. Select the user or group you want to make the owner of the object and click OK:

8. Click OK:


9. Check the box Replace owner of subcontainers and objects, if needed, and click OK:

(in our case, this is necessary to change the owner of all nested files)


Now you need to wait until the new owner is applied to all files. This can take quite a long time if there are a lot of files. Once the process is complete, you can change NTFS user permissions on the Security tab.

At various stages of download and installation windows updates 7, 8, 8.1 and Windows 10 Users may encounter error 0x80070005. It can also be displayed when the system is activated and during procedures for its restoration. This article provides a description of the causes of the error and instructions on how to fix it. If error 0x80070005 appeared in any other situation, try using this instruction, but adjusted for the specific actions during which you saw the error message and this code.

Reasons for the error

The code 0x80070005 indicates that the system cannot access certain system files and does not have sufficient rights to work with them. A similar problem sometimes occurs as a result of the work of some antiviruses that protect system files from editing and overwriting. As a result, Windows Update cannot install updated versions of some files or activation services cannot make the necessary changes to the system registry.

What needs to be done to fix error 0x80070005

If the code 0x80070005 is displayed during the installation of an update or activation operating system, you can fix it by the following step-by-step instructions:

  • Go to the official Microsoft website and download the SubInACL.exe file
  • Run this file and install from C:\subinacl\
  • Open any text editor and copy a small script into it:

@echo off

OSBIT=32

IF exist "%ProgramFiles(x86)%" set OSBIT=64

set RUNNINGDIR=%ProgramFiles%

IF %OSBIT% == 64 set RUNNINGDIR=%ProgramFiles(x86)%

C:\subinacl\subinacl.exe /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /grant="nt service\\\\\\\\trustedinstaller"=f

@Echo Gotovo.

  • Save the resulting document to the Desktop with any name, but be sure to use the .bat format.
  • Go to the desktop, right-click on the created file and select "Run as administrator".
  • Upon completion of the script, you will see the inscription Done in the Command Prompt that opens. Press any key to close the window.
  • Restart your computer and try again the operation that caused the code 0x80070005.

If the error is displayed during system restore operations or creating a restore point, try the following methods:

  • Temporarily disable active antivirus protection if it is installed on the system. It is this that can cause problems with access to system files. If that doesn't help, try temporarily completely uninstalling your antivirus software.
  • Check if there is enough free space on the drive selected for system recovery.
  • Check if the "Read Only" attribute is set for the System Volume Information folder.

After performing a scheduled upgrade to the working computer, in the process of transferring files and folders from the old disk to the new one, a problem arose with the fact that the system did not give access to some files and folders of the old disk (for example, to the user's files in the users folder), arguing that they other owner. When trying through the menu " Properties» — « Safety» ( select your user, check the box " Full access» — « Apply« ) gave the error " Error applying security settings to folder ****"

A quick googling turned up a simple and proven solution.

All that is needed to get the tool to change the owner of a folder or file is the following changes:

Attention! If you do not know how and where to add them, you do not need to do this, just download the file from the link "Download tweak" under the desired option and after downloading - click on it with the right mouse button and in the menu that appears, select " merger» — « Yes". It will be safer than without the necessary knowledge ...

If you have Russian Windows 7 , then you need to add these lines to the registry:

@="Change Ownership" "Extended"="" "NoWorkingDirectory"="" @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F" " IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant admins:F" @="Change Ownership" "Extended"="" "NoWorkingDirectory"="" @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant admins:F /t" "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant admins:F /t"

What if English, then a little differently. The difference is that in the Russian and English versions, user groups are called differently. Therefore, if you choose the wrong option, it will not work:

@="Take ownership and set full access to the object" "Extended"="" "NoWorkingDirectory"="" @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" / grant administrators:F" "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F" @="Take ownership and set full access to the object" "Extended"="" "NoWorkingDirectory"="" @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t" " IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"

After adding this data to the registry, you need to hold down and hold Shift, right-click on the problematic folder or file and select " Change of ownership«.

It may happen that after reinstalling Windows or for some other reason, the system will deny you access to some folders or files on local drives, especially if a previous version of Windows remains on one of these drives.

But what if we say you have important files on your old desktop, or in your downloads folder, or in your documents folder, or in some other special place? This article addresses this issue and presents two ways to regain access to such folders or files. For example, the suggested solutions were performed on Windows 10, but the following is true for Windows 8 and Windows 7.

First way

Right-click on the restricted folder and select "Properties" from the context menu. In the folder properties dialog that opens, switch to the "Security" tab, then in the "Groups and Users" list, find the item with the name of the account under which you are logged in and click on it with the mouse. In the lower field you can see the permissions for the folder.

You may also not see your account listed as shown in the picture above. In any case, click on the "Edit" button to change your account's access rights to the folder. If your account is listed in the upper field, skip this paragraph and read on, otherwise click on the "Add ..." button.

In the dialog that appears, type in the name of your account in the lowest field, click on the "Check names" button.

Highlight the item with the name of your account in the upper field, and in the lower box check the box next to "Full access", then click the "Apply" button.

If you see the following message while applying the settings:

Error applying security settings to... Failed to enumerate objects in container. Access denied.

or message:

Then close all dialog boxes and try the second method.

Second way

Right-click on the restricted folder and select "Properties" from the context menu. In the folder properties dialog that opens, switch to the "Security" tab, then click on the "Advanced" button.

In a new window, in the line owner, click on the "Change" link, if you need to enter your account password, enter the password and confirm the action.

A dialog box for searching and adding an account will open, the same as in the first method described above. Type in the name of your account in the lowest field and click on the "Check Names" button.

The system will find and format your account name. Click on the "OK" button to add the found account.

The dialog box will close and in the previous window, in the "Owner" line, you should see the name of your account. Be sure to check the "Replace owner of subcontainers and objects" box below it to access all subfolders and files in the folder you are trying to access, then click the "Apply" button.

Agree with the warning that you want to change the permissions for this folder so that you have full control rights by clicking on the "Yes" button.

In the next informational message, also click the "OK" button.

As a result, you should see only one item in the change owner window with the name of your account.

Click OK and close the main folder properties dialog box by clicking OK.

All! The folder should open as usual.

Hello friends! The other day, once again, I came across an error when starting some system services. Why do I say that again? The thing is, I've already met her. not for the first time, but somehow I could not get to the description of the ways in which I successfully coped with error 5.

So we meet several possible solutions that can help you if you find problems with starting services, namely “ Errors 5. Access Denied". In general, I will first describe the very essence of the error that I am talking about, so that you can determine the same problem you have or something completely different.

So, by opening the services menu and selecting the item I need, I get into their properties, where in the item about how to start the service, I set the value to “Automatically”, and also click on the “Start” button to start it immediately. But alas, instead of a successful start, a small window is displayed on the screen, with a rather strange message that the service could not be started due to "Error 5. Access denied".

This message surprised me because it said about the lack of rights, although I worked at the computer, logging in using the system administrator account, and as you know, there are all possible rights to change the properties and settings of the operating system.

How to solve the problem with Error 5?

There are quite a few solutions to this kind of problem, namely, fixing the causes of the “error 5. Access denied” when starting services, it all depends on the situation the user is facing. Further, as usual, I will not describe one hundred percent way that will help everyone, since there is none, but I will write about how I got out of this situation with a positive result.

I found some examples of fixing error 5 on the net, but I got to others myself. In general, let's see what in my practice helped to get rid of problems with starting services, but if you try to do the same for yourself, maybe one of the options I suggested will suit you.

"Error 5. Access denied" when starting system services, solutions

1. Opening full access to the "C" drive. I don’t know why, but I came across computers where the security of the system disk was set to read-only and nothing else, and this parameter was set for all accounts. But, as soon as I returned all the security checkboxes, error 5 disappeared forever, but the service started its work without any problems.

To return the rights, you need to get into the properties window of the system drive "C" and go to the tab " Safety". Having missed the list of users and groups, we go down to the "Edit" - "Add" buttons.

In the area that appears, use your hands on the keyboard to type the word " All”, which means that we will set the same access rights for absolutely all users of the system.

If everything is so, then in the previous step you did not make mistakes, click on "OK".

For those who are still Windows XP users, you should pay attention to the fact that by default you may not see the "Security" tab. In order to return it to its place, follow a few simple steps.

  1. Open any folder;
  2. Click on "Service" at the top.
  3. "Folder properties";
  4. "View";
  5. In the list of additional options, uncheck the use of simplified sharing.

After that, we perform the above described actions and, of course, we check whether you managed to cope with the error5 using this method or not.

2. Also, there is another way that I got on the Microsoft support pages. Seeing this tip in the comments, I decided to try it and the problem with error 5 when starting the service was solved.

The first step is to open command line on behalf of the administrator, if you are on this particular account, then you can not worry and just open cmd using "Run".

Now in the window that appears, write this: net localgroup administrators /add networkservice (Important: if you have English. OS then instead of Admin. specify Administrator) and press the Enter key.

Then we do this: net localgroup Administrators /add localservice . (Administrators)

When finished with the commands, close the command prompt window and restart the computer.

If the commands were entered correctly and you were lucky, then error 5 preventing the services from starting should disappear, and the services themselves will start without any access denied messages.

3. We are trying to fix the error with denied access when starting services using the registry of the operating system.

But, before we rush to chop up our registry, we first need to find out the name of the service that does not want to start. To do this, in the list of services, open the properties of the service we need and look at the line " Service name". Having remembered it, we proceed directly to working with the registry.

Registry Editor - launch it using the "Run" window. If you do not understand what it is, then you.

You should see a large list of services in alphabetical order. In order to understand what kind of service we need, I said to look at its name in the properties. So we are looking for a section with the appropriate name, right-click to call up the section menu and select the line " Permissions».

The same security setting as I described in the first paragraph should be displayed. In general, we look to ensure that full access is set in the "Administrators" and "Users" groups.


If they are not there at all, then we fix this matter, in the same way as I showed it at the beginning of the article.

4. Let's consider one more point, which is also related to access to the C drive, only this time not to all users, namely LOCAL SERVICE.

So, again we go into the security properties of the system disk. Next, after the list of users and groups, click on the "Add" button.

In the window that appears, click on "Search". As a result, a list should appear from which we need to select "" and click on the "OK" buttons.

This group should be added to the user's list, now for going down a little lower to the "Permissions for LOCAL" window, set all possible checkboxes and apply the changes.

In theory, the service should start after that, but error 5, disappear without a trace.

5. Alternatively, you can also disable or remove your antivirus and try to start the service without it. The point is that some antivirus programs besides software install additional services that could take away your rights to enable or disable some local services.

6. Well, the one hundred percent option, of course, is, I know that it won’t suit everyone, but I can tell you with confidence that it will definitely help get rid of error 5 with denial of access to start the service, well, and additionally save the computer from various other glitches and problems 🙂

On this I will probably finish my article, but if at least one of the above options helps you, then do not forget to join us

 
Articles on topic:
How to make notes and footnotes in Word
When formatting a document, sometimes it becomes necessary to explain the text and, accordingly, the question of how to make a footnote in Word. As a rule, it is a note to indicate the source of information or explain the main idea directly in the text
The best desktop reminder program
A site that gives +5 luck for an investor The best way to avoid repeating the mistake is to develop a rule that will allow you to remember the very rake that you stepped on. How I went into a plus, but went into a minus Without any explanation, the paragraph heading is an example
Picmonkey Photoshop is a handy online photo editor with many filters and effects.
Image editing in the cloud is gaining popularity. If earlier, in order to make a simple photo processing - remove the red-eye effect, make some kind of arrow, etc. we installed such professional
How to remove hyphens in a document
The installation of hyphenation in the Word text editor occurs automatically or manually. But sometimes it is not always necessary for the user. Therefore, in our article, we will look at several ways how to remove word wrap in Word. As practice shows,