Critical: /tmp partition mounted as Read-Only on CentOS 7 - ValueError: Path cannot be empty
Hello,
I'm experiencing a critical issue on one of my VPS servers (CentOS 7 / WHM v110+). Several OJS (Open Journal Systems) installations started failing with the error: PHP Fatal error: Uncaught ValueError: Path cannot be empty.
After investigation, I've confirmed that the issue is related to the /tmp partition. Although the permissions are set to 1777, the system is unable to write any files.
Diagnostic steps taken:
-
PHP Test: A simple
tempnam()call via web returns an empty string. -
CLI Check: Running
touch /tmp/test.txtas root returns:touch: cannot touch ‘/tmp/test.txt’: Read-only file system. -
SecureTmp Script: I tried running
/scripts/securetmp, but it failed with:Cpanel::Exception::TempFileCreateError ... Read-only file system.
It seems the loopback device for /tmp is corrupted or locked. Since this is a VPS environment, I'm concerned about filesystem integrity.
What is the recommended procedure to safely rebuild the /tmp partition and the /usr/testDSK file without a full OS reboot, or is a reboot mandatory in this case?
Best regards, Eugênio Telles
-
Hey there! This question would be better directed at your hosting provider as cPanel doesn't control the disk partitions or cause a partition to lock. Since this is a VPS machine your host has likely also dealt with this before on your particular platform so they should be able to provider you with the proper fix.
0 -
Hi cPRex!
Thank you for your reply.
Unfortunately, my hosting provider (Brazil HostGator) was unable to assist me with this issue. Even though I explained the full context and mentioned that AI-based support tools recommended restarting /scripts/securetmp, they did not provide me with a solution and only sent me a link to the script documentation.
Fortunately, I rebooted the VPS before making any changes via the terminal, and everything started working properly again.
Best regards,
0 -
I'm glad to hear that's all it took! Usually that's what needs to happen in these situations, but it's always good to get confirmation from the host that a reboot won't harm any data when the server is in that state.
0 -
Indeed... they gave me no instruction, just suggest to hire a developer --'
0 -
Sorry to hear that!
0
Please sign in to leave a comment.
Comments
5 comments