Technology Insights

Secure /tmp And /var/tmp Directories On CentOS Linux

A couple days ago a CentOS Linux server that I took over administration on had some mysterious files show up in the /tmp and /var/tmp directories. The files were placed in /tmp and /var/tmp by the apache user meaning there is some form of security hole in Apache, PHP, or one of the virtual hosts has an insecure application installed. Before looking into where the issue is I needed to lock things down so no applications could be executed from these directories in the future regardless of a security flaw in the future. Below are instructions on how to secure /tmp and /var/tmp.

Technology Errors

Litespeed Error Log:[ERROR] Swapping directory is not writable:/tmp/lshttpd/swap/

I booted up a server yesterday that I had not used in quite a long time and had some issues right from the beginning. I remembered the server working the last time it was live so I was assuming I could boot it up and test something on the ruby application that was installed on it. Anyhow when I attempted to connect to the web server, which is Litespeed, via a browser it would simply hang. Below is information regarding what I did to troubleshoot, what the error was, and how the error was corrected.

Technology Errors

Joomla Warning! Failed to move file.

If you are getting a warning when attempting to install a Joomla component then there is either a permission problem or a possible Joomla configuration issue. Please attempt to correct your problem by using one of the two methods below. Modify /tmp Permissions:First in your Joomla installation folder make sure that the /tmp folder has…