Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Acording to the FHS, the directories /lib and /usr/lib are both for libraries (libraries used in /sbin and user libraries, respectively).

But what about the /var/lib folder? Following the same logic this folder should have something like "variable libraries" (that sounds strange) but it actually holds data generated and maintained by running programs, or as defined by the wikipedia article:

State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.

From a fresh view, it makes more sense to put database data and served files under /srv instead of /var/lib

share|improve this question
    
We didn't write the standard. Well, most of us anyway. –  Michael Hampton Oct 18 '12 at 17:08

1 Answer 1

This is explained in the commit to the new 3.0 version:

http://bzr.linuxfoundation.org/loggerhead/lsb/devel/fhs-spec/revision/26

Specifically, /srv/ is for served, file-system structured data, /var/lib/ is for locally-consumed data. Apache will serve out of /srv as it's filesystem hierarchical. MySQL serves out of /var/lib since only mysqld accesses it and it is not filesystem hierarchical.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.