There are two reasons why you might want to make USB drives such as Flash drives or external hard disks read only.
- You own the computer and want to prevent information on your computer from leaking out but need the ability to read data from a USB drive. You cannot block access to USB ports because you need them. But you also cannot grant full access to them because that would allow anybody to steal files from the computer. The middle route is to deny write access to the USB ports.
- You own the USB drive and you are tired of getting infected with viruses from other people’s machine.
Let’s look at these two scenarios
When you own the computer
This is easy. All you have to do is prevent write access on your computer’s USB ports. This can be easily done with a registry key.
Open Registry Editor and navigate to the following registry key:
Create a new DWORD under this key and name it WriteProtect. Give it a value of 1.
The USB ports on your computer are now read only. To make them capable of writing data again, change the value of the WriteProtect key to 0.
When you own the USB drive
Some USB drives have physical write-protect switches on the body of the drive similar to the ones found on floppy disks. You throw the switch to the read-only position and nothing can be written to the drive. But these drives are hard to come by in stores and even online.
The next viable solution is a software called USBDummyProtect. This utility creates a dummy file that takes up all free space available on the drive. With every byte of free space gone there is no room for further data to be written to the drive, essentially turning it into a read-only drive. That’s some innovation!
Just copy the executable file of USBDummyProtect to the USB flash drive and run the tool. A dummy.file will be created and the drive will show 0 bytes remaining. You can now plug this drive on any infected PC and stay safe. To remove the dummy.file, simply delete it and the space will be recovered. If your flash drive is formatted in FAT32 and has more than 4GB of free space, USBDummyProtect wouldn’t work because of the limitation of the FAT specification that prevents creation of file larger than 4GB. So use NTFS for drives larger than 4GB.