Characteristics of Temporary Files
The most obvious characteristic of a temporary file is its impermanence. Beyond that, however, such files have certain other important characteristics.
Although it is possible for an application to create a temporary file anywhere the application's user has write privileges, temporary files are normally created in default directories;
/var/tmp are two of the most common, although sometimes they may also be created, possibly within a hidden subdirectory, in a user's home directory. In these well-known default locations, they are much more exposed than if they were located elsewhere. To make matters worse, these default locations are typically world-writable (if they were not, most applications ...