What Does It Mean When a File Is Read Only?

What Does It Mean When a File Is Read Only?

What Does It Mean When a File Is Read-Only? GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Software & Apps > File Types 65 65 people found this article helpful

What Does It Mean When a File Is Read-Only?

Definition of a read-only file and why some files use the attribute

By Tim Fisher Tim Fisher Senior Vice President & Group General Manager, Tech & Sustainability Emporia State University Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the VP and General Manager of Lifewire. lifewire's editorial guidelines Updated on February 9, 2022 Tweet Share Email Tweet Share Email File Types File Types Apps Windows MS Office Linux Google Drive Backup & Utilities Design Cryptocurrency A read-only file is any file with the read-only file attribute turned on. It can be opened and viewed like any other file, but writing to it (saving changes) won't be possible. In other words, the file can only be read from, not written to. A file that's marked as read-only usually implies that it shouldn't be altered or that great caution should be taken before making changes to it. Other things besides files can also be read-only, like particularly configured flash drives and other solid state storage devices like SD cards. Certain areas of your computer memory may also be set as read-only. erhui1979 / Getty Images

What Types of Files Are Usually Read-Only

Aside from the rare situation where you, or someone else, has manually set a read-only flag on a file, most of these types of files you'll find are important ones that your operating system needs to start properly or, when changed or removed, might cause your computer to crash. Some files that are read-only by default in Windows include bootmgr, hiberfil.sys, pagefile.sys, and swapfile.sys, and that's just in the root directory! A number of files in the C:\Windows\ folder and its subfolders are read-only by default. In older versions of Windows, some common ones include boot.ini, io.sys, and msdos.sys. Most Windows files that are read-only are also usually marked as hidden files.

How to Change Read-Only Files

Read-only files may be read-only on a file level or a folder level, meaning there might be two ways to handle editing a read-only file depending on what level it's been marked as read-only. If just one file has a read-only attribute, the best way to edit it is to uncheck the appropriate attribute in the file's properties (to toggle it off) and then make changes to it. Then, once the editing is done, re-enable the attribute. However, if a folder is marked as read-only, it usually means all the files in the folder are read-only as well. The difference in this and a file-based attribute is that you must make a change to the folder's permissions as a whole to edit the file, not just the single file. How to Remove Write Protection on Windows 11 In this scenario, you may not want to change the read-only attribute for a collection of files only to edit one or two. To edit this type of read-only file, you'd want to edit the file in a folder that does allow editing, and then move the newly created file into the original file's folder, overwriting the original. For example, a common location for read-only files is C:\Windows\System32\drivers\etc, which stores the hosts file. Instead of editing and saving the hosts file directly back to the "etc" folder, which isn't permitted, you have to do all the work elsewhere, like on the Desktop, and then copy it back over. Specifically, in the case of the hosts file, it would go like this: Copy hosts from the etc folder to the Desktop. Make the changes to the hosts file that's on the Desktop. Copy the hosts file on the Desktop to the etc folder. Confirm the file overwrite. How to Edit the HOSTS File in Windows Editing read-only files work this way because you're not actually editing the same file, you're making a new one and replacing the old one.

How to Make a File Read Only

After following the above directions, it should be clear how straightforward it is to clear the read-only attribute. To make a file read only is just as simple: check the Read-only box in the file's Properties window. Right-click the file, go to Properties in the menu that pops up, and then select Read-only at the bottom of the General tab. How to Password Protect a Folder FAQ Why is my Excel file read-only? Several scenarios might lead to an Excel spreadsheet opening as read-only. For instance, if the file is password-protected or was shared as a copy, it might open as read-only. Right-click the file and choose Properties to see if the Read-only attribute is checked. If so, clear the checkbox to edit the file. Why is my QuickBooks backup read-only? QuickBooks files might open as read-only if stored on a DVD or CD, in which case you can copy the file to your computer's hard drive before opening it. In addition, some files are read-only to protect from accidental edits, which you can resolve by running QuickBooks as an administrator. First, right-click the QuickBooks icon and select Properties > Compatibility > Run this program as an administrator, then attempt to open or restore the company file. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Subscribe Tell us why! Other Not enough details Hard to understand Submit More from Lifewire File Attribute Definition (What Is an Attribute?) How to Tell if Your Antivirus is Working How to Edit the HOSTS File in Windows How to Remove Write Protection on Windows 10, 8, and 7 What Is a Hidden File & Why Are Some Files Hidden? What Is a Computer File? What's Conhost.exe in Windows? What Does it Do? ADMX File (What It Is and How to Open One) What lsass.exe Is & How It Affects Your Computer The Definition of a System File and What It Does Attrib Command (Examples, Options, Switches, and More) Why Are Photos Stored in a DCIM Folder? CSV File (What It Is & How to Open One) How to Block a Website EAP File (What It Is and How to Open One) Copy Command (Examples, Options, Switches, and More) Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookies Settings Accept All Cookies
Share:
0 comments

Comments (0)

Leave a Comment

Minimum 10 characters required

* All fields are required. Comments are moderated before appearing.

No comments yet. Be the first to comment!

What Does It Mean When a File Is Read Only? | Trend Now | Trend Now