A write-only or read-only state for a FAT32 USB drive in Dolphin usually stems from filesystem corruption, incorrect ownership permissions, or the system mounting the device with restrictive flags. You can resolve this by checking disk errors using
fsck, verifying user permissions via
chown, and inspecting mount options in
/etc/fstab to ensure the volume is not locked as read-only.
Identifying the Root Cause of Read-Only Behavior
When you insert a USB stick into a Linux system running KDE Plasma, the desktop environment relies on
udisks2 to automatically detect and mount removable media. If the filesystem is marked dirty due to an unsafe removal, or if there are permission mismatches, the kernel will enforce a read-only mount to prevent further data loss. This behavior is intentional and protective, but it renders the drive useless for transferring files back to the computer.
The first step is to determine if the issue is hardware-related or software-based. While
Troubleshooting Faulty USB Ports: Tips and Methods provides excellent guidance on physical connectivity issues, a write-only symptom specifically points to logical filesystem states rather than electrical faults. We must investigate the filesystem integrity and the user's access rights before assuming the hardware is failing.
Checking Filesystem Integrity with fsck
FAT32 does not have journaling capabilities like ext4 or NTFS, making it highly susceptible to corruption when unplugged without ejecting. A corrupted FAT table can cause the operating system to mount the drive in read-only mode to protect existing data. To fix this, you need to run a filesystem check utility.
First, identify the device name of your USB stick. Open a terminal and use the command
dmesg | tail immediately after inserting the drive. Look for lines indicating
sdb1 or similar block devices. Once identified, unmount the drive if Dolphin has already mounted it using
umount /dev/sdX1. Then, run the following command to repair the filesystem:
sudo fsck.vfat -a /dev/sdX1
Replace
sdX1 with your actual device identifier. The
-a flag instructs the tool to automatically repair any errors found. If the process completes successfully, remount the drive and test writing a file again. If
fsck reports severe errors that cannot be fixed, the filesystem may be beyond repair, requiring reformatting.
Verifying Ownership and Permissions
Even if the filesystem is healthy, the user account might lack write permissions to the mounted directory. KDE's Dolphin manager typically mounts drives under
/run/media/$USER or
/media/$USER. Sometimes, these directories retain root ownership or restrictive permissions from previous failed attempts.
Check the current permissions of the mount point by running:
ls -ld /run/media/$USER/USB_LABEL
If the owner is not your username, you can change it using
chown. For example:
sudo chown -R $USER:$USER /run/media/$USER/USB_LABEL
This ensures that your user account has full control over the files on the drive. Note that changing ownership on a FAT32 drive does not alter the internal filesystem attributes but changes how the Linux VFS layer interprets access rights for the mounted path.
Inspecting Mount Options and fstab
In some configurations, the system-wide mount options may force a read-only state. Check your
/etc/fstab file to see if the USB drive has a static entry that includes the
ro (read-only) flag. While removable media is usually handled dynamically by
udisks2, manual entries can override this behavior.
Additionally, verify the global settings for
udisks2. On some systems, policies may restrict write access to certain storage types. You can check the effective mount options currently applied by running:
findmnt /run/media/$USER/USB_LABEL
Look for the
ro option in the output. If it is present unexpectedly, you may need to remount the drive with write permissions manually using:
sudo mount -o remount,rw /dev/sdX1 /run/media/$USER/USB_LABEL
This temporary fix allows you to write data while you investigate why the automatic mount was configured incorrectly.
Reformatting as a Last Resort
If neither filesystem checks nor permission adjustments resolve the issue, the partition table or boot sector may be damaged. In this case, backing up any readable data and reformatting the drive is the most reliable solution. Use the
mkfs.vfat command to create a fresh FAT32 filesystem:
sudo mkfs.vfat -F 32 /dev/sdX1
Be aware that this action destroys all data on the partition. Ensure you have selected the correct device identifier to avoid formatting your main hard drive. After formatting, the drive should mount normally with full read-write access in Dolphin.
Frequently Asked Questions
Why does my USB stick show as read-only even though I am the admin?
Administrative privileges do not bypass filesystem-level protection mechanisms. If the kernel detects a dirty bit or corruption in the FAT32 structure, it enforces read-only access regardless of user identity to prevent data loss. You must repair the filesystem first before permissions become relevant.
Can I use NTFS instead of FAT32 to avoid this issue?
Yes, switching to NTFS or exFAT often resolves persistent read-only issues because these formats handle metadata differently and are less prone to simple corruption flags. However, ensure you have the necessary drivers installed, such as
ntfs-3g or
exfatprogs, for seamless integration with KDE.
What should I do if fsck fails to repair the drive?
If
fsck.vfat cannot fix the errors, the filesystem structures are likely too damaged. Back up any recoverable files using tools like
ddrescue or by reading individual sectors, then reformat the drive completely. Continuing to attempt repairs may worsen the corruption.
Does safe removal always prevent this problem?
Safe removal significantly reduces the risk, but it is not foolproof against sudden power loss or kernel panics. Even with proper ejection, minor inconsistencies can occur. Regularly checking the filesystem health and avoiding forced unplugging are best practices for maintaining drive integrity.
How can I check if the USB port itself is causing the issue?
While port issues usually manifest as connection drops, unstable connections can corrupt data during transfer, leading to read-only states. Refer to
USB 3.1 Ports Only Working as USB 2.0 to rule out bandwidth negotiation failures that might interfere with stable data writing operations.