How to fix read-only file system on /var/tmp

Usually, file systems are running under Read-Only permissions and sometimes you will see this error while trying to make some updates or create temporary files from SSH or update EasyApache settings in your server or some other operations.

in this simple tutorial I’ll teach you how to solve this issue using SSH command lines:
The system failed to create the temporary file /var/tmp/ because of an error: Read-only file system.

The first thing you need to do is connect to your server using SSH, you can connect to SSH using WHM Terminal or using your Terminal program in your pc.

after login, run this command line and press Enter.

lsof /tmp

umount /tmp and /var/tmp directories using these commands lines

umount -l /tmp
umount -l /var/tmp

Then remove the corrupt partition files using this command line:

rm -fv /usr/tmpDSK

after that you need to regenerate the volumes/folders using this command line:

/scripts/securetmp --auto

now try to do whatever you have done before the error appears to you!

hope it’s working well now!

  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix defaultwebpage.cgi on a webserver

Running the following commands solves the above problem:   /scripts/updateuserdomains...

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Install Let's Encrypt SSL in cPanel/WHM

Let's Encrypt, a valid, open-source license that offers free SSL for your domains. The Let's...

Fix Email Issue on a server using the MSFE

To solve the problem of not sending/receiving email on a server using the MSFE / Mailscanner...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...