Introduction
When attempting to restart a service or write to the system, you encounter a read-only filesystem error. After reviewing Identifying Disk Corruption and Filesystem Errors you determine /tmp is read-only.
Description
When attempting to start or restart a service that requires access to /tmp you see the service fail to start or restart, causing a service failure. Other issues such as WHM access or PHP session may also encounter errors.
Procedure
Note: The below steps should be performed by a certified administrator to ensure nothing goes wrong.
1. Disable the /tmp from /etc/fstab with a text editor like vi, vim, nano.
The tmp path in the fstab file will look similar to the below.
/usr/tmpDSK /tmp ext3 defaults 0 0
/usr/swpDSK swap swap defaults 0 0
/tmp /var/tmp ext3 defaults,bind 0 0
Ensure "noauto" appears next to defaults or bind, so it looks like the below. This may already be configured, so you don't need to perform this step if it's already in place.
/usr/tmpDSK /tmp ext3 defaults,noauto 0 0
/usr/swpDSK swap swap defaults 0 0
/tmp /var/tmp ext3 defaults,bind,noauto 0 0
2. Disable the securetmp service.
systemctl disable securetmp
3. Next, reboot the server.
4. After the reboot has been completed, remove the old tmpDSK file.
/bin/mv /usr/tmpDSK{,.backup}
5. Then run the securetmp command to re-enable and create a new tmpDSK.
/scripts/securetmp
Enter "y" at the prompts to confirm, enable and configure the boot option.
6. Reboot the server one more time, and you are all set.