Questions tagged [fhs]

The Filesystem Hierarchy Standard defines the standard directory layout of a Linux system.

The Filesystem Hierarchy Standard defines the standard directory layout of a Linux system.

The current specification is FHS 3.0, released June 3, 2015.

18 questions
98
votes
4 answers

Is there a directory equivalent of /dev/null in Linux?

When configuring an application, you can often use /dev/null as config file if you want the application to read an empty file. But, if the application reads a list of files from a directory, you cannot use this trick. You would need to give it an…
roelvanmeer
  • 1,720
  • 2
  • 11
  • 25
16
votes
2 answers

/var/opt/ vs /var/lib

I can't decipher the deciding factor on where to place "variable program data" for an /opt installed package. On one hand the FHS says to place all variable data that dictates a program's state into /var/lib and that this data should stick around…
fthinker
  • 316
  • 1
  • 3
  • 9
11
votes
5 answers

Why does software install itself in /usr/lib?

I have been using Linux servers for years now and I keep on being confused by the Filesystem Hierarchy Standard. Usually, I can live with the confusion. But now that I am developing my own software for Linux, I need to understand where it is…
Eric MORAND
  • 293
  • 2
  • 8
6
votes
1 answer

Correct usage of /srv on debian systems

I'm a bit confused about what goes inside /srv and looking for good practices about its usage on Debian. Acording to the FHS: "/srv contains site-specific data which is served by this system". However I'm not sure if things like MySQL data files,…
L. Lopez
  • 93
  • 4
6
votes
2 answers

What is the difference between /var/mail/XXX and /var/spool/mail/XXX

I look exactly the same : But What makes me suprised is that they are synchronous.
爱国者
  • 163
  • 1
  • 5
5
votes
1 answer

Is there a standard for exported filesystem location (Filesystem Hierarchy Standard)

I have seen different approaches in different distros, where servers are placed. I saw /srv where then there was a folder for each server /srv/ftp, /srv/www etc. Earlier used /opt. I have now installed Ubuntu, and there is no /srv, but I remember…
thst
  • 185
  • 9
5
votes
2 answers

/var/lib for holding served data, why?

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…
Bruno Polaco
  • 345
  • 2
  • 9
4
votes
3 answers

Where should an SSH keyfile be stored to be FHS compliant?

I've been reading the FHS specification on http://www.pathname.com/fhs/pub/fhs-2.3.html to figure out where a (private) SSH keyfile should be stored that will be used for a VPS administration panel I am currently working on. This keyfile should only…
4
votes
2 answers

Why is the root home directory, /root not in /home? (looking for reasons other than /home is mounted on a different drive)

i know that one reason for /root not being in /home is that usually /home is mounted on a different disk and if it were to fail, we still want root to be accessible. What are some of the other reasons for this structure?
dor
  • 77
  • 1
  • 6
2
votes
1 answer

/var/ or /srv/ for websites

I know it's not the first question on that subject but my purpose is slightly more specific. I've read many discussions about it and what I understand is that semantically, according to FHS, websites should be kept in /srv directory. What I do not…
sajran
  • 61
  • 1
  • 5
2
votes
2 answers

Should logs for /opt go in /var/opt or /var/log?

A package I'm using (Graphite) insists on installing into /opt/graphite. Should logs go into /var/opt/graphite/log, or /var/log/graphite? Presume we want to be as FHS as possible. I'm using CentOS 6--would it vary by *NIX/distro?
elliot42
  • 185
  • 6
2
votes
4 answers

Where to place web content for multiple domains on a RHEL based server?

I'm setting up a RHEL web server which will host static and dynamic content for several domain names. Multiple users will update files by SSH and SFTP. Where should the files for each domain name be placed? On my default system, there is a single…
Ra01
2
votes
1 answer

Extending the Filesystem Hierarchy Standard (FHS) to house Enterprise Software

I'm not sure how many people would be interested in this, but I think if you have more than a few hundred servers, it starts becoming an issue. An applications team/middleware sends a request that they need the next version of an Enterprise software…
Xerxes
  • 4,133
  • 3
  • 26
  • 33
1
vote
1 answer

Under which folder should I persist a non-user-specific DB?

Where is it customary/appropriate for me to persist my DB? Should it be: Under /var/lib/ ? Under /var/db/ ? Elsewhere? (I'm assuming it doesn't matter which DB it is.)
einpoklum
  • 1,622
  • 3
  • 19
  • 30
1
vote
2 answers

Correct directory for Oracle installation on Linux

What is the best directory to install Oracle on Linux box? /srv, /opt, /usr/local?
Salvor Hardin
1
2