On 2015-08-25 Tue 18:51 PM |, Craig Skinner wrote:
> Hi there,
> 
> FAQ 4's title is "4 - OpenBSD 5.7 Installation Guide"
> 
> /var/tmp is listed as "now a symbolic link to /tmp" in the
> "Security improvements" section of http://www.openbsd.org/57.html
> 
> Here's a first attempt at rewording, which might need improvements:

A typo was spotted (thanks) & a question raised about purging /tmp,
yet still being able to recover editor files.

Due to /etc/{daily,rc} skirting around /tmp/{quota*,vi.recover} & others,
simply note there are a few special exceptions to the /tmp purge:


--- faq4.html   Tue Aug 25 18:16:19 2015
+++ faq4-no-var-tmp.html        Wed Aug 26 09:35:12 2015
@@ -2132,15 +2132,23 @@ Read more about this in <a href="faq14.html#Swap">FAQ 
 
 <li><b>/tmp:</b>
 This is a world-writeable directory used for (as the name implies!)
-temporary storage.
-Most systems can get by with very modest amounts of storage here, 50M is
-usually many times what you should ever need, though there are a few
-applications which can use much, much more.
+temporary storage. For example,
+<a 
href="http://www.openbsd.org/cgi-bin/man.cgi?query=vi&amp;sektion=1";>vi(1)</a>
+uses this directory for temporary storage,
+so if the computer crashes or is rebooted while editing a file,
+the files here can be used to recover the editing session.
+Most systems can get by with very modest amounts of storage here,
+50M is usually many times what you should ever need,
+though there are a few applications which can use much, much more.
 While this directory is world-writable, when it is a separate partition,
-OpenBSD defaults to mounting it nodev and nosuid, which minimizes how
-it can be used to abuse your system.
-Files left unattended here will be purged automatically, this is NOT for
-long term storage!
+OpenBSD defaults to mounting it nodev and nosuid,
+which minimizes how it can be used to abuse your system.
+Apart from a few special exceptions,
+files left unattended here will be purged automatically at
+<a 
href="http://www.openbsd.org/cgi-bin/man.cgi?query=rc&amp;sektion=8";>boot</a>
+and
+<a 
href="http://www.openbsd.org/cgi-bin/man.cgi?query=daily&amp;sektion=8";>daily(8)</a>.
+This is NOT for long term storage!
 
 <li><b>/var:</b>
 This directory and mount point is used for a LOT of things, and depending
@@ -2151,20 +2159,12 @@ Some of the things that end up here (and potential add
   <li><tt>/var/mail</tt>: Incoming mail boxes.
   <li><tt>/var/spool</tt>: Outgoing mail (and other things)
   <li><tt>/var/www</tt>: OpenBSD's web server lives here.
-  <li><tt>/var/tmp</tt>: This is a "persistent" temporary file directory,
-     as files placed here are NOT purged on reboot.
-     For example, vi(1) uses this directory for temporary storage, so
-     if your computer crashes or is rebooted while you are editing a file,
-     the files here can be used to recover your editing session.
-     Files left here over 24 hours though will be purged by the nightly
-     cleanup scripts,
-     <a 
href="http://www.openbsd.org/cgi-bin/man.cgi?query=daily&amp;sektion=8";>daily(8)</a>.
-   <li><tt>/var/crash</tt>: If the system panics, it will attempt to
+  <li><tt>/var/crash</tt>: If the system panics, it will attempt to
      save a core dump in the swap partition before rebooting.
      This core dump will then be saved to <tt>/var/crash</tt> upon
      reboot, so <tt>/var</tt> will need at least as much free space as
      the system has RAM for this to work automatically.
-   </ul>
+</ul>
 
 <li><b>/usr:</b>
 This is where most of OpenBSD resides.
@@ -2272,11 +2272,10 @@ Some additional thoughts on partitioning:
    partitions.
    This is another reason we suggest using
    <a href="faq15.html#PkgMgmt">pre-compiled packages</a> instead.
- <li>At least some editors use <tt>/var/tmp</tt> for scratch space, and
+ <li>At least some editors use <tt>/tmp</tt> for scratch space, and
    this often needs to be as big or bigger than the largest file you edit.
-   If you plan on editing 500M files, your <tt>/var</tt> or
-   <tt>/var/tmp</tt> partition will need to be much larger than your
-   might have planned on.
+   If you plan on editing 500M files, your <tt>/tmp</tt> partition will
+   need to be much larger than you might have planned on.
 
 </ul>

Reply via email to