If your SD card is mounted as read-only, it means the system is preventing any writes to the card, so you can view files but not add, delete, or edit them. This is usually caused by the physical lock switch, filesystem errors, or the card being in a protected state. Here’s how to diagnose and fix it.
Why SD Cards Become Read-Only
SD cards have a small mechanical lock switch on the side. If it’s slid down (toward the “lock” icon), the card is write-protected. This switch is the most common cause, but not the only one. The card’s internal controller can also set a permanent read-only flag if it detects corruption or wear. Additionally, the operating system may mount the card read-only if it finds filesystem errors or if the card is failing.
Check the Physical Lock Switch
Before doing anything else, eject the card and inspect the left edge. The switch should be positioned away from the “lock” label. If it’s in the locked position, slide it up. If the switch is loose or broken, the card may be stuck in read-only mode permanently. Some microSD-to-SD adapters have a similar switch—check that too.
Windows: Clear the Read-Only Attribute
On Windows, the read-only attribute can be set in the file system. To clear it:
- Open Command Prompt as administrator.
- Type
diskpartand press Enter. - Type
list diskand find your SD card’s disk number (be careful!). - Type
select disk X(replace X with the correct number). - Type
attributes disk clear readonlyand press Enter. - Exit diskpart and try writing to the card again.
If this fails, the card may be physically write-protected or failing.
macOS: Repair the Filesystem
On macOS, the read-only state often comes from filesystem errors. Use Disk Utility:
- Open Disk Utility (from Applications > Utilities).
- Select your SD card in the sidebar.
- Click First Aid and then Run.
- If errors are found, it will attempt to repair them.
If the card still mounts read-only, try using Terminal: sudo fsck_exfat /dev/rdisk2s1 (replace the device identifier with your card’s). This checks and repairs the filesystem.
Linux: Remount with Write Permissions
On Linux, you can try remounting the card with write permissions. First, find the mount point (e.g., /media/user/MyCard). Then run:
sudo mount -o remount,rw /media/user/MyCard
If that fails, unmount and remount manually:
sudo umount /dev/sdb1 sudo mount -o rw /dev/sdb1 /mnt
If the card is still read-only, check the output of dmesg for errors—it may indicate a hardware problem.
When the Card Is Permanently Locked
If none of the above works, the card’s controller has likely set a permanent read-only flag. This happens when the card’s internal flash memory has exceeded its write endurance or when the controller detects unrecoverable errors. In this case, the card is effectively write-protected for safety—it prevents further corruption. You can still read your data, but you should back it up immediately and replace the card.
Prevent Future Read-Only Issues
- Always eject the card properly before removing it.
- Use a quality card reader and avoid cheap adapters.
- Format the card regularly in the device you use most (camera, phone, etc.).
- If the card is used in a Raspberry Pi or similar, avoid sudden power loss—this is a common cause of corruption.
- Replace cards every few years if used heavily.
Frequently Asked Questions
Can I recover data from a read-only SD card?
Yes, you can usually read files even when the card is write-protected. Copy everything to your computer immediately. If the card is not recognized at all, try a different card reader or use data recovery software, but stop using the card to avoid overwriting data.
Why does my SD card keep becoming read-only after I clear it?
If the read-only flag returns after clearing it, the card is likely failing. The controller is re-setting the flag because it detects errors. Back up your data and replace the card.
Does the lock switch on a microSD card exist?
No, microSD cards do not have a physical lock switch. The switch is on the SD adapter. If you use a microSD with an adapter, check the adapter’s switch.
Can I format a read-only SD card?
No, formatting requires write access. You must first clear the read-only state (if possible) or use a tool that can force format, but that usually doesn’t work if the card is hardware-locked.
Is it safe to use a read-only SD card?
It’s safe for reading, but not for writing. If you need to write, replace the card. Using a failing card can lead to data loss.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Skip Ryobi and Milwaukee? Harbor Freight Tools to Buy
- Funny Subreddits That Make You Laugh
- Why Retro Gaming Is Still Worth Playing Today
- Sell Your EV Now Before Prices Plummet?
- KDE Connect Vulnerabilities: Are These Versions at Risk?
- Neptune Facts That Will Blow Your Mind