[nycbug-talk] why /var?

Brad Schonhorst bschonhorst
Fri Feb 18 14:57:48 EST 2005


On Feb 18, 2005, at 2:17 PM, Okan Demirmen wrote:

> On Fri 2005.02.18 at 13:42 -0500, Jay wrote:
>> On Fri, 18 Feb 2005 12:31:27 -0500 (EST), Dru 
>> <dlavigne6 at sympatico.ca> wrote:
>>>
>>> Out of pure innocent curiosity, why do you prefer /var? I don't see 
>>> the
>>> logic as I never thought of a website as "variable" data but I'm
>>> interested in hearing someone else's point of view.
>>>
>>> Dru
>>
>> I can't speak for anyone else, but I can tell you why I like /var.  It
>> all depends on how you define 'variable'.  From a system standpoint,
>> websites are fairly variable.  Unlike the executables in /bin, /sbin,
>> and /usr/*, web content is intended to change.  Maybe not everday, but
>> often.  In an ideal world, executables are completely static; if they
>> didn't have bugs, we'd never touch them.  Also, if you have any kind
>> of user-generated web data--bbs, bloggs, file submission pages--web
>> data is extrememly variable.
>>
>> The best answer, though, is that /var is where system daemons put
>> their data.  Most partition labels don't accurately reflect use
>> anymore, anyway.  We don't let many users store publically accessible
>> executables in /usr/bin or /usr/local/bin, even though that's what
>> they're there for.  Close to half of anything in most most variations
>> on the bin theme is likely to not even be binary, but executables in
>> some interpreted or compiled and interpreted language like perl,
>> python, or java.  And if we're going to be really serious about truth
>> in advertising on filesystems, the mail spool should almost certainly
>> go in /tmp, and the only honest label for the rest would be to make
>> one big /etc partition and leave it at that.
>>
>> But these things have a long and not always rational history, and /var
>> is where daemon's put their data, and /usr isn't where users put their
>> data.  And it makes sense to put the webroot with the mail spool and
>> the database directories so that you can harden /usr and enforce a
>> serious look, but don't touch policy on that partition.
>
> as you didn't intend to speak for anyone else, you did mostly for me ;)

I second that but the more I think about it, the issue probably has 
more to do with what you are used to or work on regularly.  Sometimes I 
wonder why there isn't a /log though.

> i agree with what you have stated. one can take /var, and its depths
> (/var/mysql /var/www /var/named /var/spool /var/mail .... one slice
> or many) and ship them somewhere else, without arch/os 
> concerns(mostly).
> /usr contains utils and applications (minus the stuff on /) - one
> note here, i don't quite agree with freebsd's location for
> /usr/local/etc - creates one more place to keep track of - i know
> i'll hear about this futher in this thread ;)
>

That always bothered me too, I guess I understand the idea of putting 
sys  config files in /etc and any additional software configs in 
/user/local/etc but because I work on many OS's, I always find myself 
first searching /etc, taking a moment to scratch my head and then 
remembering /usr/local/etc.   Gotta say, it seems that 2 places for 
config files violates the KISS rule...

-Brad





More information about the talk mailing list