Strategy for /tmp and /home Partitioning
Anthony Shipman
als at iinet.net.au
Thu Oct 13 15:34:53 UTC 2005
On Fri, 14 Oct 2005 01:00 am, Craig White wrote:
> not sure that I really want this thread to continue but...
>
> historically, I have gathered that the different structures were
> separated for security purposes. If you run say a web server that
> collects data and writes it to /tmp, you would probably have noexec set
> on /tmp so that nothing could be executed from there.
>
Historically it does way back, to the 70s when disks were slow and expensive
and removable disk packs were good for the biceps.
The root file system was small but fast. It contained enough to get the system
running. The commonly-used commands were there in /bin for speed.
Then if you were rich you could add on a larger but slow disk drive and mount
it on /usr. This is where the users had their home directories. Often it
would be a drive with a removable disk pack. You would have to book time to
get your project's pack in the machine.
If you were compiling you would want the temporary (intermediate) files to be
on the fastest drive so /tmp was created.
Over time more system stuff overflowed from root to /usr into places
like /usr/bin, /usr/lib etc. So now /usr is a system partition and user home
directories go in /home.
Nowadays it's clear that /tmp is a security nightmare since it is shared and
writable by everyone. There have been many security alerts about /tmp file
races. IMHO /tmp should be deprecated and each user should have its own that
is strictly private.
You can try this out by creating $HOME/tmp and setting the $TMPDIR to it. Most
temp files should automatically end up in $TMPDIR.
More information about the fedora-list
mailing list