Symptoms
Attempting to restart Apache or PHP-FPM produces errors such as:
# Apr 02 19:16:23 server restartsrv_httpd[24273]: Service Error
Apr 02 19:16:23 server restartsrv_httpd[24273]:
(XID wg98e6) The “apache_php_fpm” service failed to restart because the… error:
Apr 02 19:16:23 server restartsrv_httpd[24273]:
apache_php_fpm has failed. Contact your system administrator if the ser...over.
Apr 02 19:16:23 server restartsrv_httpd[24273]:
restartsrv_apache_php_fpm --graceful exited unclean
Websites will show 500 errors, and the Apache error_log will show errors such as:
# Fri Apr 2 20:38:29 2021 (4546): Fatal Error Unable to create lock file:
Bad file descriptor (9)
[Fri Apr 02 20:38:29.030721 2021] [cgid:error] [pid 4363:tid 47947418986240]
[client 203.0.113.2:48980] End of script output before headers: ea-php56
Attempting to create files in /tmp fails with a "Read-only" error:
# touch /tmp/test
touch: cannot touch ‘/tmp/test’: Read-only file system
Cause
When file system errors occur on the partition, the OS will mark the file system "read-only." This prevents services, such as Apache and PHP-FPM, from creating temporary files.
Resolution
Note: The following procedure should be performed by a certified administrator to ensure nothing goes wrong.
- Access the server's command line as the
rootuser via SSH or Terminal in WHM. - Open
/etc/fstabin your preferred text editor. Comment out the
/tmpentry by adding a # to the beginning of the line:CONFIG_TEXT: #/usr/tmpDSK /tmp ext3 defaults,noauto 0 0
Disable the
securetmpservice.# systemctl disable securetmp
Reboot the server.
# shutdown -r now
Remove the old
tmpDSKfile.# /bin/rm /usr/tmpDSK
Run the
securetmpscript.# /scripts/securetmp
- Enter Y at the prompts to confirm, enable, and configure the boot option.
Reboot the server again.
# shutdown -r now
Comments
0 comments
Article is closed for comments.