5

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 that providing and changing content was now to be placed in /var.

Is there a standard for exported filesystems in /var, like /var/exports/? Or is this considered wrong or bad practice?

thst
  • 185
  • 9
  • `mkdir /srv` and now you have it! – Michael Hampton Jan 12 '16 at 14:32
  • geeee, you are a true whizz :-) – thst Jan 12 '16 at 14:33
  • 1
    [The FHS](http://refspecs.linuxfoundation.org/fhs.shtml) _does_ say that `/srv` should already be there, so Ubuntu is already doing something wrong (add it to the very lengthy list). – Michael Hampton Jan 12 '16 at 14:38
  • @MichaelHampton Every time I have installed an Ubuntu system a `/srv` directory was automatically created. – kasperd Jan 12 '16 at 14:49
  • I just installed 14.04 LTS, but without `httpd`or `ftpd`or similar. No `/srv`, the `samba`-server is installed with `/var/lib/samba/usershares` as default export root by the ubuntu installer. – thst Jan 12 '16 at 15:00

1 Answers1

3

There's no standard. Just do what makes sense for your environment and be sure to document your design decision.

For my own systems, I either export the filesystem path or bind to something like /export/volume/share.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • That's what I wanted to hear :-) – thst Jan 12 '16 at 14:33
  • 1
    There is a standard. It's called FHS. It exists to ensure developers have a defined environment of where to place and look for certain things. – Nick Young Jan 12 '16 at 17:23
  • @NickYoung There's no standard amongst the distributions for what the OP is specifically asking about. This gets hairy because Ubuntu doesn't do what seasoned admins expect in many cases. – ewwhite Jan 13 '16 at 01:40
  • 2
    @ewwhite the FHS does contain a section that covers the fact that content should be placed in /srv. The question asks if there is a standard where this content should be placed, there is. The question does not ask if they should follow it, if it matters if they follow it, or even if anyone follows it. I get your point I do, I am just commenting on what the question actually asks. Is there a standard, Yes. – Nick Young Jan 13 '16 at 01:52