logo
USB affects your everyday life.
We'll show you how.

How To: Make a USB Read Only

There are two ways to make a USB stick read only. One way is a universal solution and is 100% permanent, the other way is PC specific and a good deterrent. When we say 100% permanent, this means the USB stick is read only (write protected) on all computers, whether it be a Mac, PC, Linux, etc type computer, the USB is read only and the status cannot be changed. The other method flags a USB device to be read only in relationship to the PC it is connected to so that whenever that USB stick is connected to that computer, it makes the USB read only and blocks all write commands to the device.

Most times an IT manager or content owner wants the USB stick to be read only so the files cannot be deleted or formatted of the drive. Another reason for making a USB read only is for the original files to remain the same and blocks the ability for files to be changed or manipulated. Finally, it’s smart to have USBs read only so that virus’ don’t jump onto the drive and possibly spread to other computers.

Let us start with the less permanent way because it’s easier to do and doesn’t require any specific hardware. You will need a Windows7 machine or higher. The Windows7 machine will have DiskPart utility which allows us to perform all sorts of cool things to flash drives, like setting write protection.

  • Connect the USB to your Windows computer.
  • To begin, go to your Windows Start and in the Search Field type “cmd

This will run your Command prompt.

  • Next, you will want to get to the C root of the Command prompt and if you are signed in as a user you can simply type cd\ this will get you back to the root of the C drive.
  • Type DISKPART
  • Type LIST DISK

Now you will need to find the USB stick connected to your PC. Most likely it’s DISK 1

  • We must select the device we want to change the attributes for, so type SELECT DISK 1
  • To set the drive as read only, type ATTRIBUTES DISK SET READONLY
  • DiskPart will confirm the attribute was sent and you can now type “EXIT

So what we did is make a registry entry in that Windows machine to always treat that flash drive as read only. As you can see this is a simple solution that is PC specific. In addition, if you get a registry cleaning tool like “USB Scrub” that utility will remove the registry entry we just made and the User can once again do anything they want to the drive.

Another nice and easy function to make a file more permanent is to set a file as Read Only. When a file on the USB stick is set to Read Only it blocks the User from deleting or formatting the drive. However, this only works on the PC so if the USB is put into a Mac or Linux box, they can do whatever.

Another easy way to make a USB drive Read Only is formatting the drive as NTFS. This is not recommended because the NTFS file system is what we call a ‘dynamic file system’ and is always changing. Meaning, the User will need to Eject the drive, not just yank it out of the USB socket. If you decide to format as NTFS simply modify permissions so that All Users have just Read Access. The work around is a User modifying the permissions by Taking Ownership and setting Full Access again.

So what about those USB drives that are permanently read only? No matter what you do, on which computer, you cannot remove the read only setting? The answer is this: The read only setting was done at the controller level.

What this means specifically is the USB controller chip on the flash drive ‘controls’ what happens to the data on the flash memory. One feature the controller can perform is to block the SCSI write command to the NAND memory. This is what makes the USB stick read only. The write command is blocked at the controller level. This means the setting is within the USB stick itself and is not dependent on the PC telling the User what it can and cannot do, but rather the device itself is telling the computer what it can and cannot do.

Unfortunately there is a very large number of USB controller manufacturers which all use their own set of commands to block the SCSI write command. With that said, there is no universal solution to set the read only attribute to all USB flash drives!

There is hope!

If you are reading this post you are probably trying to figure out how to make a set of flash drives read only for distribution or deployment them to a group of employees. You might even be looking for a way to turn on and off the write protection so you can remotely update software or installation files while keeping the drive read only the entire time. Wouldn’t that be nice!

A vendor out there as a very slick solution. They offer the USB drives with the ability to turn on and off the read only setting through either a command line tool, so you can do it within your own application, or through a GUI (Graphical User Interface). The command line option means through your own software you can program when to unlock and lock the USB drive! This is an ideal solution for those who need to deploy USB sticks as read only devices, yet still want the ability to update the drive, remotely, without the user having to do anything. The command line tool is designed for any exe file to call out the right code to lock or unlock the drive and do this at the exact time and place your exe file wants to.

If you are not a programmer and want to turn on and off the read only setting with a click of a button through a GUI, there is also free software which comes with the drives to make those settings: see below.

Nexcopy offers the drives in both USB 2.0 and USB 3.0 configurations and the capacity will range from the smaller 2GB drives to the very large 32GB+ sizes.

We found the Nexcopy website through this website: www.usbcopier.com which does a great job explaining USB read only, USB CD-ROM partitions and more.

Tags: , , ,

Trackback from your site.

 
 
3D Printing

Copyright ©

Copyright © 2011-2016 by
USB Powered Gadgets and more...
All rights reserved.

GetUSB offers multiple positions on our site for a variety of advertisements.

For more information,

Visit Our Advertising Page
Nexcopy provides USB copy protection with digital rights management for data loaded to USB flash drives. If you have Intellectual Property worth protecting from illegal copying, duplication or redistribution, then please Contact Us to learn more.

GetUSB | 13 Orchard Road Ste 102 | Lake Forest | CA | 92630 | P: +1 949 481 6479