If the disk is mounted as read-only, you will not be able to create or modify files. The main reasons are file system errors, media damage, or incorrect mount parameters.
Below are quick solutions.
Method 1: Check the File System
- Unmount the disk:
sudo umount /path/to/disk
- Check the file system:
sudo fsck -y /dev/sdXn
Replace
sdXnwith your device name.
Method 2: Mount with Write Permissions
- Create a mount point if necessary:
sudo mkdir -p /mnt/mydisk
- Mount the disk with write permissions:
sudo mount -o remount,rw /dev/sdXn /mnt/mydisk
Method 3: Check Access Rights
- Make sure the current user has permissions on the directory:
sudo chown $USER:$USER /mnt/mydisk
Additional Reasons
- The disk is physically damaged
- Presence of errors in RAID or LVM
- Automatic mounting with the
rooption
Conclusion
Most often, checking the file system and mounting with write permissions helps. If the disk continues to mount as read-only, there may be a hardware issue.