Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home » Storage

How to Remove Write Protection on USB Drive?

Bhishu AcharyaBy Bhishu AcharyaJuly 17, 2023
how to remove write protection on usb drive

When a USB drive becomes write-protected, you’ll face trouble copying files, formatting, or setting permissions.

If it’s done at the OS or application level, the issue persists only on your computer. However, USB drives can also be protected at the hardware, malware, or firmware levels, which may restrict performing write operations on every device.

Considering the different types of write protection, here are some effective ways to remove it.

Table of Contents

  • Check for Write-Protection Switch
  • Clear Read-Only Attribute Using Diskpart
  • Change Registry Entry
  • Perform Malware Scan on Your USB Drive
  • Format and Remove Encryption
  • Dump Your USB Drive

Check for Write-Protection Switch

write protection switch
Check for write-protection switch on your USB flash drive

Some high-end flash drives are equipped with a physical switch that lets you enable/disable write protection at the hardware level.

There’s a chance that you have accidentally shifted the latch to the ‘lock’ position. Unlike SD cards, most USBs do not include this, which is also why many users were reportedly unaware of this feature.

  • Disconnect the drive and check the indication at the bottom or the side. 
  • Now, all you have to do is slide the switch to the ‘unlock’ position, which should remove the write protection.
  • Reinsert your USB drive and try copying files or formatting it to confirm that it’s now working.

Clear Read-Only Attribute Using Diskpart

In most cases, your USB drive is set to Read-Only mode, and you’re accompanied by “The disk is write protected” and “Remove write protection and use another disk” errors.

You can easily disable this using a dedicated command. Also, some third-party drive management applications allow you to do it.

Since Read-Only is enforced within your operating system (through system calls to the kernel), the write protection gets implemented only on your computer. So, you shouldn’t have issues copying/formatting/setting permissions on other devices.

To remove the write protection on the operating-system level, here’s what you can do:

  1. First, launch the Run app by pressing Windows + R hotkey.
  2. Execute diskpart command.
    diskpart in run
  3. You’ll need to press Yes in the User Account Control prompt to launch the utility.
    yes to access diskpart
  4. Run the list disk command and check for your flash drive based on its size.
    list disk diskpart
  5. Then, execute the select disk <disk_no> (for example, select disk 1). This should select your USB drive.
  6. Now, type attributes disk clear readonly and hit Enter. This will remove the Read-Only mode on the selected disk.
    attributes disk clear readonly
  7. To verify, run the attributes disk command. Here, both the Current Read-Only State and Read-Only fields should display No.
    attributes disk check current read only state and read only

Note: If you’re unable to perform write actions and instead receive a “You need permission to perform this action” message, it’s indicating a write permission issue rather than write protection.

Change Registry Entry

Sometimes, you may encounter ‘Yes’ in Current Read-Only State and ‘No’ in the Read-Only field when checking your disk’s attributes. In such cases, just clearing the read-only attribute won’t help.

Before focusing on other write protection levels, I advise examining your registry keys first. Windows lets you tweak the DWORD values that can enable/disable read-only mode for all your external storage devices. Here’s how:

  1. Use Windows + R to launch Run and execute regedit.exe.
    regedit exe in run
  2. Once prompted, hit Yes and the Registry Editor window should open up.
    registry editor yes to provide admin access
  3. Paste the following path in the address bar and hit Enter:
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
  4. Double-click on the WriteProtect DWORD value or similar indication from the right pane.
    open writeprotect dword value
  5. Change the value to 0 and press Ok.
    writeprotect value 0
  6. Now, reboot your computer and reinsert the flash drive.
  7. Try copying a file into the USB drive to see if changing the registry entry has removed the write protection.

In case you didn’t find the StorageDevicePolicies key, you may manually create one. This can help allow write access by introducing the missing key.

Also, it can fix possible registry corruption that could have caused additional problems with the write access.

  1. Right-click on the Control key and select New > Key.
    control new key
  2. Rename this to StorageDevicePolicies.
    storagedevicepolicies
  3. Right-click anywhere in the empty area. Then, select New > DWORD (32-bit) Value.
    new dword storagedevicepolicies
  4. Rename it to WriteProtect.
  5. By default, the value should be 0. Nonetheless, you can still verify by checking the Data field.
    writeprotect and check value
  6. Reboot your PC and reinsert the USB drive. Then, check if you get access to write data in your flash drive.

Perform Malware Scan on Your USB Drive

You might have noticed that certain files on your USB drives can’t be deleted. It throws unexpected errors that keep you from removing it.

This possibly means that your file is infected by malware capable of write protecting certain files or even the entire drive.

A simple workaround here is to use reliable antivirus software. You can have multiple ones but if you do not even own one, you may utilize the built-in Antivirus program on Windows:

  1. Use Windows + E hotkey to launch the Explorer.
  2. Select This PC from the left pane.
  3. Expand Devices and drives (if needed), right-click on your USB drive, and pick Scan with Microsoft Defender.
    scan with microsoft defender
  4. Once the Windows Security app opens up, select Full Scan and hit Scan Now.
    scan now full scan
  5. Wait for the built-in antivirus to scan and remove possible malware that could have led to write-protection errors.
    wait for sacn to complete
  6. Once that’s done, you can now format the USB drive or wipe it to ensure the malware is removed for good. Now, you should be able to perform write operations if the culprit was malware.

Format and Remove Encryption

formatting usb drive using gparted linux
Demonstration: Formatting USB Drive using Gparted in Linux

If none of the above methods helped you out, you can certainly use a reliable application to bypass the write protection on your USB drive.

  • There are plenty of third-party applications that let you modify the write-protection settings. Just make sure you have downloaded a reliable one to perform this action.
  • In case that doesn’t help, try reformatting the drive. A few high-end third-party drive management utilities should allow it even when the ReadOnly mode is enabled.
  • You can even try formatting your flash drive using Linux-based utilities, like Gparted.
  • While most HDDs and SSDs offer dedicated applications to control firmware-level write protections, there might be limited ones for USB flash drives. Kingston Format Utility and Apacer USB Repair Tool are some popular ones.
  • You can check your manufacturer’s website to find out if they have a dedicated program for your Pendrive.
  • Some vendors offer encryptions to lock the USB flash drives. Without a password, you won’t be able to access any content from the disk. 
  • So, if you notice a ‘lock’ icon on your drive or get the “Access is denied” error when trying to copy files, you need to enter the appropriate password to gain access first.
  • If the USB drive is encrypted using Windows Bitlocker, you need to use the correct credentials here as well.
  • To ensure you get access the next time, you can now turn it off from Control Panel > System and Security > BitLocker Drive Encryption.
  • In case your PC doesn’t support Windows BitLocker or you do not remember the password, you may format it to gain back the read and write access.
    When doing so, you will lose all your data. So, only opt for this if you’re not worried about your files (or you have already backed up your data).

Dump Your USB Drive

Even if none of the above solutions worked for you, your flash drive could have automatically enabled write protection as it’s on the verge of its end life. Different sectors of the disk could have worn out and are no more reliable. 

Unlike SSDs, the lifespan of a flash drive is even shorter. However, there’s no standard factor to measure this and even vendors do not provide a dedicated specification for it.

Also, it’s possible that the internal chip of your flash drive has detected an unrecoverable failure. While there might be some advanced tools that can help you reset the write protection flag, this might not be a feasible option for everyone.

While it might be disheartening to hear, it’s possible that your USB drive can no longer write data. So, the only option is to try recovering the files in it using advanced software. Then, you may physically destroy it (which happens to be the best way to dump the drive in this scenario).

how-to
Bhishu Acharya
  • Twitter
  • LinkedIn

Bhishu Acharya is a technical content writer at TechNewsToday. He specializes in monitors, laptops, storage devices, and other peripherals. Apart from computer hardware, you can also find his how-to and troubleshooting articles on Windows, internet, security, and networking. Ever since getting his hands on a personal computer, Bhishu started exploring its internal components at just 10. His growing curiosity led him to undertake the Computer Science & Information Technology degree and is just a year away from graduation. While balancing his study and work life for over four years, he has harnessed different sets of technical skills. With his expertise, he is now dedicated to helping netizens looking for hardware and software-related fixes. Today, Bhishu’s proficiency extends beyond computer hardware. In his spare time, he enjoys coding and learning new programming languages. You can contact him at bhishu@technewstoday.com

Related Posts

motherboard chipset

Understanding Motherboard Chipset and Its Importance

September 20, 2023
best pattern to apply thermal paste

Best Thermal Paste Pattern: 5 Methods Tested

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 2023
msi raid

How To Create A RAID Array On MSI Motherboard

September 17, 2023
printer-keeps-going-offline

How to Fix Your Printer That Keeps Going Offline

September 16, 2023
motherboard slots

Motherboard Slots and Sockets: Beginner’s Guide

September 20, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 27, 2023
motherboard chipset

Understanding Motherboard Chipset and Its Importance

September 20, 2023
Naval-Warfare-Games

Best Naval Warfare Games

September 18, 2023
You may also like
printer-not-printing

How to Fix a Printer That’s Not Printing

September 26, 2023
Share Location With Friends and Family

Share Location With Friends and Family (iPhone and Android)

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.