Can someone advise me on the pros and cons of deleting the contents of /tmp/ as part of general security conscious non-paranoia. I was thinking that it would be an okay thing to do periodically (or at logout, etc.) using a overwriting/shredding program. But, before I committed myself, decided it was prudent to ask.
From the FHS:
tmp : Temporary files Purpose The /tmp directory must be made available for programs that require temporary files. Programs must not assume that any files or directories in /tmp are preserved between invocations of the program. Rationale: IEEE standard P1003.2 (POSIX, part 2) makes requirements that are similar to the above section. Although data stored in /tmp may be deleted in a site-specific manner, it is recommended that files and directories located in /tmp be deleted whenever the system is booted. FHS added this recommendation on the basis of historical precedent and common practice, but did not make it a requirement because system administration is not within the scope of this standard. So it is safe to delete /tmp when you know that no running programs are using any file there. You can delete /tmp in the beginning of the boot process, as the FHS itself suggests. I think this already happens automatically on Debian, but I'm not sure. -- Software is like sex: it is better when it is free.