Directory /tmp

Many programs use the /tmp directory for writing temporary data. Programs generally remove the data when it is no longer needed. Otherwise the /tmp directory is cleared when the server restarts.

Examples of software which uses the /tmp directory:


 * MediaWiki, for storing sessions, and as a temporary directory for uploads
 * svn-load, for creating a temporary Subversion working copy

On shared hosts, the /tmp directory is shared among all customers on the server. On a private server the /tmp directory is not shared, but is limited in size to 128MB.

When the /tmp directory becomes full, some programs will stop working. For example, it will no longer be possible to login to MediaWiki, because MediaWiki will not be able to store another session.

One possible solution is to configure programs to use another directory for storing temporary data. A /home/ /tmp directory is an example. To configure MediaWiki to use this directory, use the following options:


 * Manual:$wgUploadDirectory
 * Manual:$wgTmpDirectory

For other software, the TMPDIR environment variable may be an option.

For much software, to maintain control of the temporary storage for files and add security for things like sessions, you can configure the software to use any directory you want for temporary storage. In this case, it is often desirable to make this directory one within your own user space (generally outside a web accessible directory) where you can control the housekeeping and your files are protected from view by others on the server.

Warning: do not put anything of long-term importance in any directory, in any path in your home directory, named tmp, cache, temp, or xml_cache on a Dreamhost shared server.

It has been confirmed that these files may be randomly deleted. The deletion occurs in the course of an automatic process backing up/ restoring/ moving your files. For further information see this thread: http://discussion.dreamhost.com/showthread.php?mode=linear&tid=129029&pid=#pid

Also note that any file in directories named like that are also excluded from the Dreamhost automated "one button site backup".