You Do Not Have Permission to Open This File

Here, we discuss everything about software applications, Android and iOS Apps, Windows and Linux Operating systems, etc.
Post Reply
Alex George
Global Moderator
Posts: 147
Joined: 14 Nov 2023, 04:39
Location: Brooklyn

You Do Not Have Permission to Open This File

Post by Alex George »

In my last post, I mentioned an error message. The error message was:

You do not have permission to open this file. See the owner of the file or an administrator to obtain permission.
Today we discuss this error message. We will check the meaning of this error and how to resolve it.

When Did I See The Error Message?
The last post published on SysToSys was about disabling Google Chat on a Windows computer.

As part of the steps, I asked to open Notepad as administrator. I mentioned the error You do not have permission to open this file if Notepad does not have administrator privilege.

The steps in the last post require editing the Windows Hosts file.

You will get an error if you try to edit and save the Windows Hosts file on Notepad without administrative privilege.

Check the screenshot below. You can see the error message displayed by Notepad.

Image

I opened the Windows Hosts file with Notepad and edited the content. While trying to save the changes, I received this error.

Code: Select all

C:\Windows\System32\drivers\etc\hosts
You do not have permission to open this file. See the owner of the file or an administrator to obtain permission.

Now we will check the meaning of this error message.
Alex George
Global Moderator
Posts: 147
Joined: 14 Nov 2023, 04:39
Location: Brooklyn

Re: You Do Not Have Permission to Open This File

Post by Alex George »

What is The Meaning of The Error Message: You Do Not Have Permission to Open This File?

The error message is plain simple self-explanatory. Windows showed this message when I tried to save the changes made on the Windows Hosts file.

That is an important file, and any edit requires administrative privileges. Even though I logged in as an administrator, the application (Notepad) did not have administrative elevation.
Microsoft Notepad did not have administrative permission to edit the Windows hosts file.
Windows prevented my action and issued the error message to inform it.

So, how do we fix the error message: You do not have permission to open this file. See the owner of the file or an administrator to obtain permission.
Alex George
Global Moderator
Posts: 147
Joined: 14 Nov 2023, 04:39
Location: Brooklyn

Re: You Do Not Have Permission to Open This File

Post by Alex George »

How to Fix the Error:-You do not have permission to open this file

We have discussed the reason for getting this error message. The application we used requires administrative permissions to complete the task.

The solution is to open the application with administrative privilege.
If you do not know how to start an application with administrative privilege, follow the guide below.

In our case, we must start Notepad with administrative privilege. The first step is to start the Windows search. You can open the Windows search by pressing the Windows and S keys together.

Type the application name in the search bar. In my case, I need Microsoft Notepad with administrative permission.

So, I type Notepad.

Image

You can type the name of the application you require instead of the Notepad.

Click the option Run as administrator.


Now you can use the application to perform the task you intend to do. You will not get the error message again.
Thomas
Standard User
Posts: 46
Joined: 21 Oct 2023, 15:30

Fix The Error: You Do Not Have Permission to Open This File

Post by Thomas »

Apps need to be in administrative mode to perform administrative tasks. Run as administrator is the only option to avoid the error 'You do not have permission to open this file'.
Rahul Agarwal
Standard User
Posts: 20
Joined: 16 Nov 2023, 14:08

Re: You Do Not Have Permission to Open This File

Post by Rahul Agarwal »

Great tutorial. thanks Alex
Post Reply