How To Remove Write Protection On USB

Sometimes, while trying to copy files to the pen drive, you may get the error message that says, “The disk is write-protected.” When a USB drive is write-protected, it restricts users from making any changes to the files and folders. Although we can format the drive to remove any write-protection settings, some computers don’t let us format the flash drive itself. 

Now, let us see how to remove write protection on a USB without further delay. Here is a list of things you can try to disable the write protection on a USB. 

How to Remove Write Protection on USB?

Here are a few simple ways you can remove the Write Protection on USB drives. 

USB With a Lock Switch

Most SD cards and USB drives have physical switches to lock themselves. These switches are usually located on one of the sides of the drive. You might also notice “Lock” written on the front side of the SD card. 

When locked, users cannot write anything on the drive. This switch also prevents users from accidentally removing any data inside the USB drive. To disable this feature, we can simply disable the switch physically. 

If you do not have a physical switch, we can move on to other fixes.

Format the Drive

Formatting the removable drive will erase everything permanently and set all the settings to default. The write-protection settings will also return to the default state. Since we are about to delete all data, make sure you backup all your necessary files and folders inside the drive before starting the format process.

When you try to format, the error message might pop up that says, “You do not have sufficient rights to perform this operation.” This means that the user does not have enough privileges to format this drive. Scroll down to Solutions for Windows to fix this issue.

Note: This step may not work for all Windows users.

For Windows

  1. Insert the USB drive.
  2. Right-click on the external drive you want to format.
  3. Click Format. Another dialog box will open.
  4. Under File System, choose either FAT32 (File Allocation Table 32) or NTFS (New Technology File System).

Note: FAT32 is compatible with all Operating systems and is the default for all USB drives. However, only Windows, MacOS, and Linux OS support NTFS.

  1. Then, under Allocation size units, choose Default allocation size.
  2. Under Format Options, check or uncheck Quick Format. Quick Format does not erase the data, and we can recover deleted files. Meanwhile, unchecking Quick Format will erase everything and usually takes a few minutes.
  3. Click on Start.

For MacOS

  1. For MacOS, when you insert the USB drive, it will be displayed on the desktop. 
  2. Now, click on the search icon in the top right corner. 
  3. Search for “Disk Utility” without the quotation mark and click on Disk Utilities.
  4. From the list displayed on the left side, select your USB drive.
  5. Click on Erase at the top.
  6. Now, type a name for the drive select Format as MS-DOS (FAT).
  7. Then click on Erase.
  8. After the process is complete, click on Done.

For Chromebook

  1. Click on Apps and go to Files. You can also press the Alt + Shift + M keys on the keyboard.
  2. Right-click on the drive you want to format and select Format Device.
  3. Click OK and wait for the process to complete.

How to Remove Write Protection on USB on Windows?

We have listed a few of Windows specific fixes that you can try to remove the write-protection.

Disable Deny Write Access

The Local group policy feature in Windows Pro and Enterprise Edition has access to many features, including removable disk access. Using the Local Group Policy Editor, an admin can modify access features for multiple users and computers throughout a network environment.

Unfortunately, the Local Group Policy Editor will not be available on Windows Home Edition. However, we can get the Policy Editor by running a Group Editor batch file which will enable the Group Policy.

Follow these steps to Enable Group Policy on Home edition.

Note: you do not need to follow these steps if you are using Professional or Enterprise version.

  1. Download the batch file.
  2. If your web browser gives you some warning, ignore them. As batch (.bat) file are system files, the browser will warn that this type of file may harm the OS itself. 
  3. Double-click on the file you just downloaded and let the command run.
  4. Once everything is complete, your computer can access the Local Group Policy Editor

How to Disable Deny Write Access?

Follow these steps to disable Deny Write Access feature.

  1. Press the Windows + R key to open Run
  2. Type “gpedit.msc” without the punctuation mark and press Enter.
  3. Local Group Policy Editor dialog box will open. Here, on the left side, Under Computer Configuration, click on Administrative Template > Removable Storage Access.2. enable disable write protection e1643542646637
  4. Double-click on Removable Disk: Deny Write Access on the right section of the dialog box.
  5. Another dialog box named Removable Disks: Deny write access will open.disable deny write access
  6. Ensure that the check box is either set to Not Configured or Disabled.
  7. Once you make the changes, click on Apply, then OK.

Bonus Tip: You can fix most of the permission issues from Group Policy Editor.

Using Diskpart Command

The Diskpart manages all the storage that the computer detects. We can use this command to manage partitions of all storage devices connected to the computer. It can also manage write protection settings, create, delete or merge partitions.

Follow these steps to disable write protection using Diskpart.

  1. Press the Windows + R key.
  2. Type “cmd” without the quotation mark and press Ctrl + Shift + Enter to run Command Prompt as administrator.
  3. Now, type “diskpart” and press Enter
  4. To list out all the storage devices connected to the computer, type “list disk” and press enter.
  5. You will see all the storage named Disk 0, Disk 1, Disk 2, and so on, along with their details. locate removable disk command
  6. Here, locate your removable drive from the Size columns. Your USB drive’s size must match one of the disks from the list.
  7. Type “select disk X” where X is the disk number of the removable disk.
  8. Type “attributes disk clear readonly” without the quotation mark and press Enter.
  9. Wait for the command to remove the write protection. When the process is complete, type “exit” and press Enter.
  10. Restart your computer to save the changes.

Try copying some files onto the USB. Continue with the next step if this solution does not work for you.

Edit the Registry Configuration

The Registry Editor allows users to change database values stored in Windows. As the write protection values are also stored in the Registry, we can manipulate these values to remove the write protection.

However, wrong changes in the Registry may damage the OS itself. Although changing the following values will not affect your computer, read every step very carefully before making any changes.

Before we start, it is recommended to backup the Registry settings if we make any wrong changes.

  1. Insert the removable drive into your computer.
  2. Press the Windows key + R and type “regedit registry editor
  3. Now, navigate to the following location from the left panel of the Registry Editor.
  4. Double-click on StorageDevicePolicies. There should be an item on the list named “WriteProtect” on the right panel.
  5. Double-click on “WriteProtect” and set Value Data to “0.set dword value
  6. Click OK to save the changes. 
  7. Restart your computer to apply those changes.

If the StorageDevicePolicies is missing, we need to add this folder and “WriteProtect” along with its value. Follow these steps if StorageDevicePolicies are missing.

  1. Right-click on Control (from Computer\SYSTEM\CurrentControlSet\Control in Registry Editor)
  2. Click on New > Key.regedit new keyvalue
  3. Rename the created folder as “StorageDevicePolicies“.
  4. Now, right-click “StorageDevicePolicies” and click on New > DWORD (32bit) dword value
  5. Name the entry as “WriteProtect“. 
  6. Double-click WriteProtect and set the Value Data to “0“.
  7. Click OK to save the changes.
  8. Restart your computer to apply changes.

After we restart the computer, all write access. 

Turn off Bitlocker

Bitlocker in Windows encrypts your data so that unauthorized users cannot access them. If the USB drive is encrypted with BitLocker, we need a password to access these data or turn off the feature. If a removable drive is encrypted with BitLocker, it is indicated by a lock icon. 

Although we cannot access the drive unless we have a password, we can format the drive to remove this feature. However, formatting the drive will permanently delete every file and folder inside it.

Please follow these steps to Turn off BitLocker.

  1. Insert the USB Drive and right-click the removable drive from File Explorer.
  2. If you are using Windows 11, click on Show more options. If you are using Windows 10, ignore this step and continue to step 3.
  3. Click on Manage Bitlockermanage bitlocker
  4. Under your Removable data drives, click on Turn off Bitlockerturn off bitlocker
  5. Another dialog box will open. Here, click on Turn off BitLocker.turn off bitlocker

It may take a few minutes, depending on the size of the USB drive.  

How to Remove Write Protection on USB on MacOS?

Here are a few fixes we can try to remove write protection in macOS.

Repair Disk Permission

Permission setting in the MacOS can sometimes stop you from copying a file onto the USB drive. For MacOS, although formatting the USB drive is a viable option, you can use the Disk Utility feature to reset the permission on your removable disk.

Follow these steps to repair Permission settings.

  1. Insert the USB Device.
  2. Click on the search icon and search for “disk utility” without the quotation mark on the top-right corner.
  3. Click on the first search result named Disk Utilities.
  4. Select the removable drive you want to repair and click on the Firstaid tab.
  5. Click on Repair Disk Permissions.

In the latest version of MacOS, Apple has removed the Disk Utility feature to Repair Disk Permission. However, we can use the Terminal. Follow these steps to Repair Disks Permission.

  1. Click on File located on the top left side of the desktop.
  2. On the Finders window, click on Applications.
  3. Scroll down and open the Utilities folder.
  4. Open
  5. Now, type the following command.

diskutil resetUserPermissions / `id -u`repair disk permission macOS

The above command will reset any read or write permission on all your storage devices

If the above command does not work, try running the following command.

sudo diskutil resetUserPermissions / `id -u`

The “sudo” command will run any command with superuser privileges and it stands for Super Do.

Restart your computer to save changes.

If both commands do not work, we can also use the repairVolume command to fix any issue. Follow these steps to repair your removable drive.

First, we need to know the disk number (example: disk2l1) that the computer has assigned to your removable drive. For this, type “diskutil list”. Now, according to the size, find your removable drive.

If you cannot find the disk number, type diskutil info “USB’s name” |grep Node (Replace USB’s name with the name of your removable drive). Now, note the node given by this command. Example /dev/disk2l1 .

Once you know the disk number, type the following command.

sudo diskutil verifyVolume /dev/disk2l1

sudo diskutil repairVolume /dev/disk2l1

When typing the above command replace the /dev/disk2l1 with the output from the previous command.

Related Question

How to Disable/Enable Write Protection on a File?

If you cannot modify content inside a file, then maybe your file is on read-only mode. To enable/disable write protection or read-only mode on a file, we need to change the attribute’s value of a file. Follow these steps to change the attributes of a file.

  1. Right-click on the file that you want to enable/disable write protect.
  2. Click on Properties.
  3. On Attributes, check or uncheck Readonly depending on what you want to do. If you’re going to hide a file, you can check Hidden as well.

How to Add Write Protection To a USB Drive?

To add Write Protection to a USB Drive, follow this process.

  • USB physical switch.
  • Using diskpart command.
  • Changing certain registry values Registry Editor.
  • Enable Deny Write Access from Group Policy Editor.

Add a Comment

Your email address will not be published. Required fields are marked *