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!

  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

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...

Domain names are not showing in WHM

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

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...