There is no permission to save the hosts file. You don't have permission to access this folder in Windows - what to do

Question from a user

Hello!

I need to edit the "hosts" file, but I can't do it because... When opening a file, I see the error: "You do not have permission to open this file. Contact the owner or administrator." What can be done?

I completely checked the system with antivirus (Doctor Web), no viruses were found...

Hello!

Well, in the vast majority of cases, this happens due to some settings in Windows, viruses and security programs that block access to many system files (for example, antivirus programs, no matter how strange it may sound).

By the way, as for Dr.Web, its treatment CureIT utility often blocks access to just the file hosts.

Below, I'll look at how to fix everything...

So, what to do with it (with an error...)

An approximate type of error that pops up when this happens is shown in the screenshot below. I note that a similar error can appear when editing any files and programs.

1) Allow everything to everyone through file properties

Right-click on the file (which does not want to open), and in context menu select properties .

Then check all the boxes, allowing reading, writing, and modification to all user groups. Save your changes.

In most cases, the error should go away...

2) Trying to change access via the command line

An identical* operation can be done using the command line. To do this, you need to run it on behalf of administrator .

Reference! How to run the command line (including as administrator) -

cacls.exe C:\WINDOWS\system32\drivers\etc\hosts /C /G SYSTEM:F All:F

An example of such an operation is presented below.

For reference!

The CACLS command is used to view and change Access Control Lists (ACLs) for files. CACLS is considered somewhat outdated, but nevertheless still works!

3) Check security programs (antiviruses, security utilities)

Some antivirus programs, and especially anti-malware programs, may block access to some system files. For example, if we touch on the same hosts- then access to it is blocked by many utilities (for example, Malwarebytes, AVG, Panda (when max. protection is activated), Doctor Web, etc.).

Try disabling or uninstalling such software for a while.

By the way, most antiviruses can be easily disabled for an hour or two via the tray icon.

4) UAC... (User Account Control)

One more point: when activating maximum protection UAC(this is a special module in Windows for monitoring all significant changes in the system) - it may happen that you will not be able to change some of the files (in general, this doesn’t happen very often, because the slider is turned to the maximum manually, which means you would be in the know...) .

To configure UAC "sensitivity" - open the panel Windows management, then the “User Accounts” section, and again the tab of the same name (see screenshot below).

Change User Account Control settings

Next, simply drag the slider down, reducing the level of control (mode: " never notify"- means that UAC will not notify you about changes made by you or applications. This option disables UAC!) .

Save the changes and check the system. After eliminating the error, restore the settings that you changed.

Additions on the topic are welcome...

After Windows installations 10 over previous version Windows You may find that when you try to save a file to another (non-system) partition, an error appears:

You do not have permission to save files in this location. Contact your network administrator for permission.

This is what the error window looks like when you try to save a file downloaded from the Internet directly to another (non-system) local drive in the browser" Mozilla Firefox":

Also, when copying or moving files in Windows Explorer, you may see the following warning:

To copy to this folder you must have administrator rights

To avoid such an error or warning and be able to save files to folders on other sections of hard disk, you need to configure permissions for such folders or partitions. The following operations can be applied to both a folder and a disk partition to obtain write permissions for all folders on the disk and for the disk as a whole.

In Windows Explorer, right-click on the folder (or Local drive) for which a warning or file writing error appears, switch to the "Security" tab and click on the "Change" button.

In the Groups or Users list, find and highlight Authenticated People. If there is no such item, click on the "Add" button.

In the dialog that appears, in the lower field, type the phrase “Verified” and click the “Check names” button.

The system will find and format the name of the found user group. Click on the "OK" button to add the user group.

In the previous dialog box, for the “Validated” item in the top list, check the boxes next to the items in the bottom list:

  • Change
  • Read and Execute
  • List of folder contents
  • Reading
  • Record

Attention: There is no need to tick the "Full access" box!

Click on the "Apply" button, wait until the operation is completed and click "OK".

As a result, in the security properties window you should have an "Authorized" item with the items listed above checked.

Close this window by clicking "OK".

That's all! Files should be saved without errors or warnings.

After installing Windows 10 over a previous version of Windows, you may find that when you try to save a file to another (non-system) partition, an error appears:

You do not have permission to save files in this location.

This is what the error window looks like when you try to save a file downloaded from the Internet directly to another (non-system) local drive in the Mozilla Firefox browser:

Also, when copying or moving files in Windows Explorer, you may see the following warning:

To copy to this folder you must have administrator rights

To avoid such an error or warning and be able to save files to folders on other partitions hard drive you need to configure permissions for such folders or sections. The following operations can be applied to both a folder and a disk partition to obtain write permissions for all folders on the disk and for the disk as a whole.

In Windows Explorer, right-click on the folder (or Local drive) for which a warning or file writing error appears, switch to the “Security” tab and click on the “Change” button.

In the Groups or Users list, find and highlight Authenticated People. If there is no such item, click on the “Add” button.

In the dialog that appears, in the lower field, type the phrase “Verified” and click the “Check names” button.

The system will find and format the name of the found user group. Click on the "OK" button to add the user group.

In the previous dialog box, for the “Authenticated” item in the top list, check the boxes next to the items in the bottom list:

  • Change
  • Read and Execute
  • List of folder contents
  • Reading
  • Record

Attention: There is no need to tick the “Full access” box!

Click on the “Apply” button, wait until the operation is completed and click “OK”.

As a result, in the security properties window you should have an “Authorized” item with the items listed above checked.

Close this window by clicking OK.

That's all! Files should be saved without errors or warnings.

How to fix "You do not have permission to save files in this location" error when editing hosts.txt

  • AJIekceu4
  • July 21, 2015
  • 26 983
  • 70,97%

C:\Windows\System32\drivers\etc\hosts.txt
You do not have permission to save files in this location.
Contact your network administrator for permission.

First method (fast)

We copy this file (hosts.txt) to any place, for example on the desktop, make the necessary changes in it, save and then replace old file in the folder C:\Windows\System32\drivers\etc\hosts.txt. The system will display a warning, but will allow you to replace it.

Click continue and the file changes to ours, in which we made the changes.

Second method (longer, but correct)

We need to launch text editor, with which we plan to modify the hosts.txt file with administrator rights. To do this you need to do the following:

Windows 7 and older:
Start > All programs > Accessories > Notepad (right click > Select “run as administrator”) then in notepad click “file > open > and go to the path C:\Windows\System 32\drivers\etc\ and select the file hosts.txt.

Windows 8 and later:
Open the start menu, type Notepad there, run it with administrator rights (right-click > Select “run as administrator”), or go to the C:\Windows\System 32\ folder and look for the file notepad.exe (right-click > Select the item “run as administrator”) then in notepad click “file> open> and go to the path C:\Windows\System 32\drivers\etc\ and select the file hosts.txt

The same thing, but via the command line:
Launch the command line as administrator, insert the following command there:

We make the necessary changes and save the result.

Rate this article

Other articles:

Comments:

    • Daniel
    • 29.12.2017 05:56

    Thank you SO MUCH guys. I have Windows 7; other sites give stupid advice that doesn’t help. Wasting time, wasting time. Then I went to your website. The quick method did not help, but method 2 did. Thank you, my mood immediately improved

    • Answer
    • Stan
    • 15.01.2018 21:21

    Start - Control Panel - User Accounts - Change User Account Control settings - Slider to the very bottom.

    Problem with Administrator rights

    Often, when saving files (any format), a sign appears on which the address where I am saving the file is written, and the text
    "You do not have permission to modify files on this network drive.
    Contact your administrator for permission to make changes."

    try creating another user and doing the same. or enable the built-in Administrator entry

    Pepel,
    saving files to the root of the disk is considered very bad form.
    Now I specifically tried it - Word displays the message -
    C:\123.docx
    You do not have permission to save in this location.
    Contact your network administrator for permission.
    Want to save to My Documents instead?
    Not really
    That is, there is generally no way to save a file there without editing the security settings.
    And by editing these settings, you can run into a bunch of glitches caused by this.
    It may be easier to save files to standard folder? Or for example in the folder C://xxx or D://xxx?
    Where xxx is any folder name convenient for you.

    Andrey100, Don't know. it saves fine for me

    Regarding saving to the root - you can set the rights without changing the permissions of the nested structure (just add a user and allow him to save, just uncheck the box for applying permissions inside the container) and it will save - only I, personally, am against saving to the root system disk.

    Let me resume the topic. There is a problem. Exactly the same thing, when I try to save something somewhere on my computer, periodically, 1 out of 10 somewhere, a similar message appears, and when I try to save again, there is a warning that such a file already exists, I overwrite it and then everything goes wrong. Until next time. On the first try, a “broken” file is created.
    The problem arose a couple of weeks ago for seemingly no reason. Only that day I added 4 gigs of memory to the 4 available ones (Windows 7x64). I removed the memory - the problem did not go away.
    As a possible side effect of the problem, 3dsmax is now unable to exit gracefully. archicad is not able to work - when accessing the explorer (open, shorten as.) - the program crashes

    What could be, where to dig. By the way, the problem with Archikad persisted even when reinstalling Windows on another disk. Problems appeared one day

    Error "You do not have permission to save files in this location Windows 10"

    These instructions are intended for those who, while downloading a file through a browser or simply copying it to the system drive C, encountered the following error (of course, the file name and path may be different):

    Full message text

    First you need to find out why this happened. So, if when you try to save a file, a sign appears that says “You do not have permission to save files in this windows location 10", there may be several reasons for this. There are two main ones:

    1. The user tries to save the file to the root folder of the hard drive on which Windows was installed (most often drive C).
    2. Windows 10 was installed on top of another operating system of this family, and the file cannot be saved anywhere except the system disk.

    It is not saved to drive C, Windows folder, etc.

    The problem arises due to the fact that the system is initially protected from the possible penetration of viruses that the user receives as part of the downloaded file. The error window prompts you to save the file to a folder that will be safe and recommended for of this type(for example, for pictures they will recommend “Images”, for audio recordings – “Music”, etc.).

    The solution is simple - one of three options:

    1. Agree to the system's proposal.
    2. Click “no” and specify another path - for example, to a special download folder.
    3. Select item 1 or 2, then move from the folder where the file was saved to the desired one.

    Attention! It is not recommended to use the third option in relation to files with .exe permission, as this risks infecting the computer.
    For those who continue to want to save files in the wrong place, contrary to recommendations, the algorithm in the next subsection will be useful.

    An error occurs when trying to save to a non-system drive.

    If a single download is intended, it is easier to save the file where the system suggests and then transfer it to Right place. Otherwise it is better to do additional settings permissions for folders and files:

    1. Open Explorer.

    Opening Windows Explorer

    2. Right click mouse click on the folder shortcut or local disk, where you need to save the files (for example, to drive C:):

    Right click on drive C

    3. Select "Properties".

    C drive properties

    4. Switch to the “Security” tab.

    Go to the “Security” tab

    5. Click “Change”.

    Changing security settings

    6. In the window that opens there should be a “Verified” item. If yes, move on to the next step. If there is no such item, you need to create it. To do this, click on “Add”, and then in the window that opens, enter the phrase “Verified”, then click on “OK”.

    Search for a user or group

    7. In the “Allow” column, check all the boxes except the first one – “Full access”. Click “OK”.

    Setting permissions for a user or group

    Problem solved. Now you can easily save files to this folder or to this local drive.

    GeekElectronics » Windows must die » Windows 10 - You do not have permissions to access this folder

    Yesterday I updated my laptop to Windows 10 and ran into a small problem. When I tried to open directories on the disk, the message “ You do not have permission to access this folder”.

    In fact, this problem can be solved by simply changing owner for now catalog and its contents. In case someone doesn’t know how to do this, I decided to describe everything step by step.

    Opening properties folders.

    Then go to the Security section.

    At the bottom of the window, click on the Advanced button.

    At the top we see that in the line Owner it says “Could not display the current owner” and a link to Change.

    Click on Change.

    In the window that appears, enter your user name.

    To once again make sure that we did not make an error when entering, click on the Check name button.

    Great. The user is specified correctly. Click on the OK button in this window.

    At the top of the window, check the box “Replace” owner subcontainers and objects”, so as not to repeat this procedure for all subfolders and files.

    Clean the registry manually Cleaning Windows registry 10: manually or with programs On Windows 10, the registry is entered through the Run tool (Win + R). You should enter the regedit command. Initially, Microsoft stated that registry optimization was not required, but […]

  • How to show file extensions in Windows 10, 8 and Windows 7 This instruction details how to force Windows to show extensions for all file types (except shortcuts) and why you might need it. Two […]
  • Best program to clean + optimize + speed up your computer. Practical experience Hello. Every computer user dreams of his “machine” working quickly and without errors. But, unfortunately, dreams do not always come true... More often […]
  • Access rights to files and folders in simple terms. In the vastness of Russia, many firms and small enterprises do not have their own staff system administrator on permanent basis or coming from time to time. The company grows and sooner or later [...]
  • Windows Cleaner - free program for cleaning and optimizing the Windows XP / Vista / 7 / 8 / 10 system Version: 2.2.29 dated November 8, 2016 File size: 5.8 MB High-quality cleaning of the Windows operating system Free program […]

These instructions are intended for those who, while downloading a file through a browser or simply copying it to the system drive C, encountered the following error (of course, the file name and path may be different):

Full message text

First you need to find out why this happened. So, if, when you try to save a file, a sign appears that says “You do not have permission to save files in this location in Windows 10,” there may be several reasons for this. There are two main ones:

  1. The user tries to save the file to the root folder of the hard drive on which Windows was installed (most often drive C).
  2. Windows 10 was installed on top of another operating system of this family, and the file cannot be saved anywhere other than the system disk.

It is not saved to drive C, Windows folder, etc.

The problem arises due to the fact that the system is initially protected from the possible penetration of viruses that the user receives as part of the downloaded file. The error window suggests saving the file in a folder that is safe and recommended for this type (for example, for pictures they will recommend “Images”, for audio recordings – “Music”, etc.).

The solution is simple - one of three options:

  1. Agree to the system's proposal.
  2. Click “no” and specify another path - for example, to a special download folder.
  3. Select item 1 or 2, then move from the folder where the file was saved to the desired one.

Attention! It is not recommended to use the third option in relation to files with .exe permission, as this risks infecting the computer.
For those who continue to want to save files in the wrong place, contrary to recommendations, the algorithm in the next subsection will be useful.

An error occurs when trying to save to a non-system drive.

If a single download is intended, it is easier to save the file where the system suggests and then move it to the desired location. Otherwise, it is better to perform additional settings for folder and file permissions:

1. Open Explorer.

Opening Windows Explorer

2. Right-click on the shortcut to the folder or local drive where you want to save the files (for example, to drive C:):

Right click on drive C

3. Select "Properties".

C drive properties

4. Switch to the “Security” tab.

Go to the “Security” tab

5. Click “Change”.

Changing security settings

6. In the window that opens there should be a “Verified” item. If yes, move on to the next step. If there is no such item, you need to create it. To do this, click on “Add”, and then in the window that opens, enter the phrase “Verified”, then click on “OK”.

Search for a user or group

7. In the “Allow” column, check all the boxes except the first one – “Full access”. Click “OK”.

Setting permissions for a user or group

Problem solved. Now you can easily save files to this folder or to this local drive.

Each folder has its own instructions. The created rules protect and prevent data loss, which, unfortunately, often causes problems for the user. Very often, when deleting, moving, or trying to launch some folders, users may encounter the restriction “You do not have permission to access this folder.” In this article we will tell you what to do and how to unlock access to resources in Windows (7, 8, 10).

Main reason for refusal

Often, main reason blocking is a mismatch between the name of the administrator and the owner of the PC or the lack of proper rights to perform the operation. This happens when reinstalling the OS, and especially during the transition from seven to ten or when using several operating systems on a computer. In particularly severe cases, the user tries to change something in the system directories, which is highly undesirable. Is it possible to quickly gain access? Yes, you just need to find the right solution.

We give permission to access a folder in Windows 10

Second way

An alternative option is to repeat steps 1-5 from the previous instructions, but instead of choosing a name, we will set it ourselves. Through the window "Enter the names of the objects to select" You can enter one of the options:

  • users or user;
  • administrators, Administrators, Administrator;
  • Users.

One of them will definitely do. Make sure you have all permissions for this account.

If you don't have permission in Windows 7

With seven everything is much simpler. Going into Safety and selecting the item "Additionally", your name will be immediately suggested account and the Administrators group. If this does not help you, then in this window select the button "Change", and similarly find or register the owner. Don't forget to set the change for subfolders (this notification appears when there are subfolders in the main folder).

More complex ways

In most cases, the previously described methods are quite sufficient, but in particularly severe cases they will not help. You'll have to take a more complicated path - assign an owner to the registry key.

  1. Right-click on the required section and select Permissions.
  2. At the bottom of the window, click “Advanced”.
  3. We indicate the Owner.
  4. Set the required permissions.

This solution is necessary in situations where we are talking about installed programs or games. It is assumed that several accounts are used on the computer, and the software is installed for a specific one of them.

Interacting with the Command Line

It is immediately necessary to clarify that you need to open the console on behalf of the Administrator, regardless of the running account.

“takeown” is a command that assigns the current user as the owner (of a folder or file).

  • takeown /f "(file location)";
  • takeown /f "(path to folder)" /r /d y.

Here are some illustrative examples:

  • takeown /f “D:\Music\1.mp3” – for a file;
  • takeown /f “C:\Windows” /r /d y – for the folder.

The “icacls” option is a command that changes permissions on a folder or object. In our case, we are interested in discovering the full set of actions, so we will only talk about them.

To open full access, use the commands:

  • icacls "(file path)" /grant (username):F /c /l;
  • icacls "(folder path)" /grant (username):F /t /c /l /q;

You can use any other group instead of the username. In addition, you can find batch files online that will automatically perform the described procedures.

In the case of a flash drive

If you have a similar problem with folders on a flash drive, then changing the owner and permissions does not always solve the problem. The reasons for denial of access may lie in blocking software. For example, antiviruses and, in fact, viruses are often blamed for this. Disabling protection or scanning the system and the flash drive itself can help in this case. If the flash drive is empty, format it.

If suddenly the steps described above do not help in the case of a flash drive, then you should use special programs, to unlock access to files. So, the Unlocker, Uninstall Tool, Total Commander. They already provide a mechanism for working with such conditions and restrictions. Any such program must be run as administrator.

Let's sum it up

All of the above methods fully solve the blocking “You do not have permission to access this folder” and you now know what to do about it. In any case, remember that Windows activates protection for some folders for a reason. This is especially true for system directories and files located in them. Before deleting, moving or changing, always check the information on such objects.