[lsb-discuss] FHS-type question - where to put modifiable data shared by all users?

Wichmann, Mats D mats.d.wichmann at intel.com
Wed Apr 22 13:17:25 PDT 2009


David Bruce wrote:
> If there is a better place to ask this question, please let me know.
> The list I found for FHS is abandoned to spam.

FHS is in the process of becoming an active Linux Foundation project.
This is as good a place as any for the moment, although I think
there will be a fresh mailing list.

> The program's bundled word lists go under e.g.
> /usr/local/share/tuxtype, which is read-only for ordinary users and
> also would get clobbered by upgrades.  I don't think this location
> should be modified in the ordinary operation of the program.

The answer I have (this is an opinion, not a ruling, to be clear :)

Mirror where the files are installed.

* modifiable data ought to go in /var, as has been noted already,
so you can use /var/lib if you're putting stuff in the system
heirarchy, but I'd think of that space as reserved for distros,
so you should only configure these files to go in /var/lib if
the program files are configured for /usr/bin, /usr/lib,
/usr/share

* if the package is configured to install in /usr/local (and
this is the *only* time you should use /usr/local/share, by
the way), then use something under /usr/local, probably
/usr/local/lib - although this bit isn't really spelled out.
you could equally argue there ought to be a /var/local for
this purpose, but there isn't one for now.

* if the intent is to make a separately installable (not
distro-packaged) thing, then files should go in /opt,
and modifiable files in /var/opt.

So... your configure script should derive the path for
modifiable files differently depending on whether the
root is /usr, /usr/local, or /var; it should also provide
a configure option to explicitly set where the person
building the code can specify it.  I *think* that this
maps to the --localstatedir=DIR configure option that
some packages have.



More information about the lsb-discuss mailing list