I reformatted an external SSD as Btrfs and could copy files to it briefly. After it disappeared during use and I reconnected it, the files were missing and it seemed to be root-only again. What should I check before changing permissions or formatting it again?
Why does my external drive keep becoming read-only on Fedora?
Answers
First, separate ownership from a read-only mount. A root-owned drive can still be writable by root, but if the kernel remounted the filesystem read-only after errors, changing file permissions will not fix it. Watch system logs while reproducing the issue, for example with sudo dmesg -w, and look for filesystem, I/O, or USB disconnect errors.
Back up anything still readable before running repair tools. If the logs show filesystem errors, unmount the drive and check the Btrfs filesystem with an appropriate Btrfs check or repair procedure. Avoid running repair commands on a mounted filesystem, and do not reformat until you know the data is safe.
Reply to this answer
Repeatedly disappearing, slow ejection, and writes not being there after reconnecting point beyond a simple ownership setting. It could be a failing drive, a bad cable or enclosure, or an unreliable USB connection. Try another cable and port, connect directly rather than through a hub, and see whether the problem follows the drive on another computer.
Also check the driveโs health information if available. If errors persist across cables and systems, save what you can and contact the seller or manufacturer about warranty service.
3MUX.r:
Could an underpowered USB port cause symptoms like this, or would it usually just disconnect?
Reply to this answer
One caution: the file manager showing root ownership is not, by itself, proof that permissions changed. Btrfs stores Unix ownership and permissions, so the account that created the files and the mount options matter. But an abrupt disappearance and missing writes are reasons to investigate the device and filesystem before changing ownership recursively.
Once the drive is stable and mounted read-write, you can inspect its mount point and ownership, then set access for your user if needed. Donโt use a blanket recursive permission change as a first troubleshooting step.
Reply to this answer
Add your answer
Answers are reviewed before publication.
7Bit+Q:
The log output has a lot of errors. Iโll stop trying to change permissions and check what kind of errors they are first.