You are not logged in.

#1 2010-04-23 03:53:30

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Where do public data files belong in directory tree

I'm running a server which provides data files, primarily via samba and apache, for the entire office.  I've put the data files in various places on previous machines, but I'm trying to figure out where they really belong.

Everybody writes files to the server, and everybody needs to be able to access those files.  I thought to put them in /home, but since they really don't belong to any particular user, is that where they should go?  I thought under /srv, but more reading makes me think that is inappropriate too.  Perhaps they belong under /usr, but then what I read about /usr talks about program files, not data files, which makes that sound incorrect as well.  Everything I'm reading seems to take the approach that files should be in the home directory of the user who owns them, but that would leave them scattered about on the system, not where everyone can easily find them.

I may be over-analyzing the whole thing, but I would appreciate the input of those more experienced.

Offline

#2 2010-04-23 12:12:55

steve___
Member
Registered: 2008-02-24
Posts: 454

Re: Where do public data files belong in directory tree

I'd put all the data on a separate partition or in an LVM container and then mount it (eg /mnt/filestore).  Now you can create symlinks for whomever to wherever.

Offline

#3 2010-04-23 12:20:28

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Where do public data files belong in directory tree

There was a thread with a similar goal not too long ago: http://bbs.archlinux.org/viewtopic.php?id=87125.  Unfortunately, no concensus was reached.

For what it's worth, my preference is still /home/share.

Offline

#4 2010-04-24 14:34:01

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: Where do public data files belong in directory tree

I can see why no consensus was reached.  I've now looked at that link, where some recommend a place in /usr, but the FSH info that I found says:

/usr is the second major section of the filesystem. /usr is shareable, read-only data

So that doesn't seem right.

Others recommend /var, but the FSH info says:

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

Nope, not there either.

Final suggestion there is /home.  The files don't need to belong to a particular user, as set forth previously, and the FHS helps with

/home is a fairly standard concept, but it is clearly a site-specific filesystem. The setup will differ from host to host. Therefore, no program should rely on this location.

For an OS that serves gazillions of files to as many users, it just strikes me as odd that there isn't a standard here.  That being said, individuality is often a good thing.

Thank you for your suggestions, both of which make a lot of sense.  I am leaning toward /home/share.

Offline

#5 2010-04-26 21:29:42

rwd
Member
Registered: 2009-02-08
Posts: 671

Re: Where do public data files belong in directory tree

What's wrong with /srv  ?

Offline

#6 2010-04-27 17:44:41

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: Where do public data files belong in directory tree

The reason I'm not sure this is the right place is that while the description sounds right

/srv contains site-specific data which is served by this system.

The information on the description sounds like it isn't

This main purpose of specifying this is so that users may find the location of the data files for particular service, and so that services which require a single tree for readonly data, writable data and scripts (such as cgi scripts) can be reasonably placed.

I'm not finding it right now, but the description talked about http, ftp, etc; I suppose samba fits there, just not sure.  Again, maybe I'm overanalyzing this whole thing

Offline

#7 2010-04-27 18:40:30

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Where do public data files belong in directory tree

/usr/share/?

Offline

#8 2010-04-27 20:33:33

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: Where do public data files belong in directory tree

I tend to use /var/$service with its own partition, ie /var/samba for the samba shares, /var/www for web stuff etc

Offline

#9 2010-04-27 23:10:07

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: Where do public data files belong in directory tree

rwd wrote:

What's wrong with /srv  ?

+1

I use /srv divided by protocol or purpose:

/srv/http/
/srv/backup/
/srv/media/
/srv/samba/
/srv/ftp/
/srv/tftp/

etc

I create symlinks where appropriate (eg, /srv/samba/backup --> /srv/backup/)

Offline

Board footer

Powered by FluxBB