Symptoms
A site that is not functioning or opening properly gives either a 503 Service Unavailable or 500 Internal Server Error, and the following error in the Apache error log ( /var/log/apache2/error_log ) and/or the stderr.log ( /var/log/apache2/stderr.log ):
[:error] [pid 11817] [client 0.0.0.0:52413] Fatal Error Unable to create lock file: Bad file descriptor (9)
Description
The "Fatal Error Unable to create lock file: Bad file descriptor (9)" error is typically caused by issues with /tmp or CageFS.
Workaround
First, ensure /tmp has the correct permissions assigned to it. You can do so by running the following command:
stat -c %a /tmp
If /tmp does not have 1777 permissions, this can be corrected with the following command:
chmod -v 1777 /tmp /var/tmp
If you have CageFS enabled, you may need to disable and re-enable CageFS for the user by running the following commands:
/usr/sbin/cagefsctl --disable USERNAME
/usr/sbin/cagefsctl --enable USERNAME
Please note, make sure to replace USERNAME with the actual username.
Comments
0 comments
Article is closed for comments.