0

I recently upgraded to 18.04, and found out that when I tried to save files in Firefox I got an error saying that the "could not be saved, because the disc, folder, or file is write-protected. Write-enable the disc and try again, or try saving in a different location"

After doing some digging I discovered that /tmp had become read-only since the upgrade. Is there anything I can do?

I tried the answers outlined here, but none of them worked.


Output of ls -ld /tmp :

drwxrwxrwt 21 root root 69632 Apr 28 12:10 /tmp


Output of mount | grep tmp:

udev on /dev type devtmpfs (rw,nosuid,relatime,size=3993816k,nr_inodes=998454,mode=755) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=804648k,mode=755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) tmpfs on /run/user/128 type tmpfs (rw,nosuid,nodev,relatime,size=804644k,mode=700,uid=128,gid=142) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=804644k,mode=700,uid=1000,gid=1000)


Output of df /tmp:

Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda5 25087084 17130836 6658840 73% /


Output of mount | grep /dev/sda5:

/dev/sda5 on / type ext4 (ro,relatime,errors=remount-ro,data=ordered)

8
  • please edit your question and add the output of ls -ld /tmp
    – Yaron
    Apr 29, 2018 at 20:06
  • I've added the requested info
    – user8814
    Apr 29, 2018 at 20:10
  • These permissions are perfectly fine. Maybe Firefox is getting confined by some AppArmor profiles which are inappropriate in 18.04...
    – Byte Commander
    Apr 29, 2018 at 20:46
  • I'm not sure it's that. I tried creating a file using touch inside /tmp, and it wouldn't let me do so in a read-only file system. Can't rm /tmp either.
    – user8814
    Apr 29, 2018 at 20:49
  • Can you add the output of mount | grep /tmp then?
    – Byte Commander
    Apr 29, 2018 at 20:50

1 Answer 1

3

It looks like your "/" has been remounted to "ro" most likely due to "errors=remount-ro". Check your /var/log/syslog and "smartctl -a ".

We had this happened to us once when the hard drive was on the brink of total failure. You want to act quickly because it deteriorates very fast.

2
  • Also look in dmesg. I had this happen. There was a kernel message about an ext4 aborted journal.
    – Kaz
    May 2, 2020 at 0:54
  • Turned out it was close to failure. Accepted answer.
    – user8814
    Nov 2, 2021 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .