[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#775318: debian-policy: Using /srv instead of /var/lib for served user-level data



Hello,

On الثلاثاء 13 كانون الثاني 2015 19:50, Russ Allbery wrote:
I'm afraid that you're misreading the FHS.  It actually *prohibits* the
distribution from doing what you want and using /srv by default.

This is the important part of the /srv description for this purpose:

    The methodology used to name subdirectories of /srv is unspecified as
    there is currently no consensus on how this should be done. One method
    for structuring data under /srv is by protocol, eg. ftp, rsync, www,
    and cvs. On large systems it can be useful to structure /srv by
    administrative context, such as /srv/physics/www, /srv/compsci/cvs,
    etc. This setup will differ from host to host. Therefore, no program
    should rely on a specific subdirectory structure of /srv existing or
    data necessarily being stored in /srv.

In other words, we're not allowed to assume any particular directory
structure under /srv (which would be necessary to configure packages to
use it by default), and are not allowed to use /srv without your (the
administrator's) explicit permission.
Thanks for the clarification-- I mistakenly thought this meant that the distribution could define its own directory structure there.
  For anything that packages need to
use out of the box, /var is the correct file system:

    /var contains variable data files. This includes spool directories and
    files, administrative and logging data, and transient and temporary
    files.

Such things as databases are variable data files.  Packages are certainly
allowed to put them under /srv if you've explicitly configured them to do
so, and hence expressed the file structure that you want to use, but we
can't assume that.

/srv exists for you to structure however you like, and then explicitly
configure packages to use if you choose.  /var is the default data store
for everything, and where everything goes unless you explicitly configure
it otherwise.
Many thanks for your explanation.

Regards,
Afif


Reply to: