findmnt -no OPTIONS / and sudo dmesg | grep -iE 'error|read-only'. If errors show, back up first, then repair with fsck from rescue mode. If it was mounted read-only on purpose, sudo mount -o remount,rw / makes it writable again.
Before you start
- While the filesystem is read-only, logs, databases and package updates can’t write. Don’t keep restarting services: find the cause first.
- If the cause is disk errors, copy important data off before you try any fix. A read-only filesystem can still be read.
- Commands use
sudo. As root, leave it out.
Step 1: Confirm which filesystem is read-only
ro at the start of the options confirms it. Replace / with the folder that fails (for example /var or /data) if it’s a separate mount.
Cause 1: The kernel found errors and protected the disk
On Ubuntu and Debian, the root filesystem is usually mounted witherrors=remount-ro: when ext4 finds an inconsistency, it switches to read-only instead of carrying on. A crash, a forced power-off or a failing disk can trigger it.
Check:
EXT4-fs error (device vda1) or I/O error, dev vda confirm it. On XFS (AlmaLinux and Rocky), the filesystem shuts down instead, and writes fail with Input/output error.
Fix:
1
Back up what you need
Copy databases and files to another machine while you still can read them, for example with rsync. Nothing can be saved on the read-only disk itself, so send copies straight to the other machine.
2
Repair from rescue mode
Start rescue mode, find the disk with Use the device name from
lsblk -f, and repair it without mounting it:- ext4 (Ubuntu / Debian)
- XFS (AlmaLinux / Rocky)
lsblk.3
Boot normally
End the rescue session and check the options again with
findmnt -no OPTIONS /.dmesg lines. On a dedicated server, check the drives with smartctl and open a ticket.
Cause 2: It was mounted read-only on purpose
Someone (or a script) mounted it withro, or /etc/fstab says so. dmesg then shows no errors.
Check:
ro in the options column of the affected mount.
Fix: remount it writable now:
ro to defaults (or remove ro) in /etc/fstab, then run sudo findmnt --verify.
Cause 3: Only one service sees it read-only
If the shell can write but a service logsRead-only file system, systemd’s sandboxing is the likely reason. Units with ProtectSystem=strict (or full) see /usr, /etc or the whole system as read-only.
Check:
sudo systemctl restart myapp. In Docker, the same error means a volume is mounted with :ro or the container uses --read-only.
How to check it worked
Frequently asked questions
Will a reboot fix it?
A reboot runs the automatic check, which fixes small problems, so the server may come back writable. If the errors were serious, it can stop at boot instead: see Linux server won’t boot. Back up before you reboot.Is “Read-only file system” the same as “Permission denied”?
No. “Permission denied” is about your user’s rights on one file. “Read-only file system” blocks everyone, root included.Can a full disk cause this?
No. A full disk gives No space left on device. Read-only is a mount state.Related guides
VPS and dedicated server guides
Every guide in this section.
Linux server won't boot
Emergency mode and fsck at boot.
Check disk health
SMART checks on dedicated servers.
Back up a Linux server
Get your data off safely.
No space left on device
The other common write error.
Checked against the official ext4 kernel documentation (
errors= mount option), the mount, e2fsck and xfs_repair manuals and the systemd systemd.exec manual on 4 November 2026; the read-only error, findmnt output, mount -o remount,rw and offline e2fsck / xfs_repair runs were tested on loop-device filesystems on Ubuntu 24.04 LTS. The systemd sandbox fix was not tested.Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026