Skip to main content

Fix: Notepad Access Denied

The error “Access is Denied” occurs when the operating system is unable to save or edit any file using the notepad application. These files are mostly system files which are mostly found in system folders (such as System 32, Program files etc.).
This is basically a user access control function which restricts you from changing system files or creating new ones in system directories. It is done for the safety of your own computer so important system files don’t get changed and you preserve the integrity of the operating system. This has been the case for all versions of Windows.

However, there are instances where you want to deliberately make some changes to some system files and this error can get problematic. We will go through all the steps needed to make sure you get your work done without the annoying error message popping up. This error is also known to pop up when you try to change the “host” files present in the System32 directory.
Note: Malware and virus are known to make changes to the host file. Make sure that you are virus free whenever you are editing the file.

Solution: Using ‘Run as Administrator’

We will open the Notepad application and run it using the ‘Run as administrator command’. This command will enable administrator privileges and open the application in an elevated mode. Do note that you are required to use an administrator account to use this solution.
  1. Press Windows + S, type “notepad” in the dialogue box, right-click on the application and select “Run as administrator”.
  1. A small UAC will pop up asking you to confirm your actions. Press YES to proceed.
  2. Click File > Open.
  1. Now navigate to the location of the file you are trying to access. Make sure “All files” is selected so all type of files are displayed in the window. Select it and click “Open”.
  1. The file will be opened successfully. Make all the necessary changes and click “Ctrl + S” to save the file or save it manually using the options.

Note: If you cannot edit the host files even after performing the above solution, you should check if you have any antivirus enabled on your computer. Third party antivirus software makes sure that you cannot edit any system files even with administrator privileges. Same goes for the firewall. Make sure they are disabled temporarily and try with the solution again.
If you cannot still access the file under discussion, make sure that the ‘Read-only’ option is unchecked in the file’s properties. You can also take ownership of the file, edit it, and change the ownership back. Take a look at following article. Follow the same method on how to take ownership.

Comments

Popular posts from this blog

How to Format/Indent XML Files in Notepad++

Notepad++ is a free text and source code editor that is mostly used by programmers. It is an advanced alternate version of the default notepad which supports 50 programming, scripting and markup languages. It allows a user to edit codes within multiple tabs in a single window. However, it lacks the formatting for XML files or XML code. Users will find it difficult to edit or read the XML code without the correct format for code. How to Format/Indent XML Files on Notepad++ What is XML File? XML (stands for eXtensible Markup Language) which is a language designed to store and transport data. XML files are just plain text files that can’t do anything on their own. Custom tags are used in XML files to define objects and the data within each object. It defines a set of rules for encoding documents in such a format that both humans and machines could read. XML is similar to HTML but the difference is that HTML defines how data looks, while XML defines what data is. XML Code samp...

How to Fix ‘The Local Security Authority Cannot be Contacted’ Error on Windows

This error appears when users try to login to other computers via a remote desktop connection. The problem prevents them from connecting and it displays the “The Local Security Authority Cannot be Contacted” error message. The problem often appears after an update has been installed on either the client or the host PC and it causes plenty of problems on many different versions of Windows. The Local Security Authority Cannot be Contacted There have been many unofficial fixes for the problem which were created by the users who had the same unfortunate experience. We have gathered the working methods in this article so make sure you follow it in order to resolve the problem. What Causes “The Local Security Authority Cannot be Contacted” Error on Windows? Pinpointing the correct cause for the problem is one of the most important steps when it comes to resolving one. That is why we have created a list of possible causes for the problem so make sure you check it out below: D...

Fix: The Active Directory Domain Services is currently unavailable ‘Windows 7, 8 and 10’

The error Active Directory Domain Services is currently unavailable means that the system is not able to find and connect to your printer, hence the process is stopped and cannot proceed further. This process allows the computer to manage and allocate resources. If this error occurs, it means that there is most probably a problem with the permissions, drivers, UAC etc. We have listed down a number of solutions for you to check. Start with the first one and work your way down. Solution 1: Resetting Printer Spooler Settings The spooler service is a software program which is responsible for managing all print jobs being sent to the computer printer. The print spooler service is usually visible to users and they can also cancel a print job which is being processed. It also allows them to manage jobs which are currently on the waitlist. We can try restarting this service and check if this solves the problem. Press  Windows + R  to launch the Run application. Type ...