3

I have a couple folders I'd like to set up on my network. The file server is Linux/Samba and the clients are all Windows machines.

Where is the best place on an Ubuntu file system to put these shared folders, like Applications (install exes), Books (pdfs, epubs), Videos, etc?

4 Answers 4

3

The general rule with linux is that if it's something that doesn't fit anywhere else, you should dump it in /srv/.

6
  • 4
    [citation needed] Sep 19, 2009 at 13:28
  • I agree, best place for random files served over network is /srv/ Sep 19, 2009 at 13:35
  • 2
    @Dennis '/srv contains site specific data that is served by this system'. Sounds pretty much exactly like what he's looking for. pathname.com/fhs/pub/…
    – Cian
    Sep 19, 2009 at 15:19
  • 2
    /srv is a good choice for stuff you're serving, and this is true in the sense that if you're serving something that doesn't have a specific location already, like /var/www, then /srv makes sense. /srv is definitely not a 'miscellaneous' folder though!
    – Lee B
    Sep 19, 2009 at 16:10
  • 1
    Well, I consider /var/www to be a legacy directory, since "user-controlled" data does not belong into /var. /var/www should be named /srv/www (or /srv/default-www or something similar). Oct 14, 2009 at 13:11
2

Take a look at http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard, this explains how the directories are organized in Linux. User spesific files are stored under /home directory with seperate directories for each users.

1
  • 1
    These files are not user-specific; they are shared by all users on the network
    – rcampbell
    Sep 19, 2009 at 13:31
0

For example: /home/shares.

0

The Filesystem Heirarchy Standard does not give clear guidance (at least to me) on placement of files under these circumstances. However, interpreting what it has to say about things in general that seem to also apply here, I would place such documents in one of the following places (in order of preference):

  1. /var/share
  2. /var/local/share
  3. /home/share
  4. /home/[department or category]/share
  5. /share

Consideration of ease of managing access rights should be given to how you plan to further subdivide the structure.

A couple of commenters have mentioned /srv and one could make the argument that your files could be placed under /srv/samba. However, I disagree if the files may be made available via other services or locally to the host system.

Granted, these are my interpretations and recommendations. If you want better guidance, you should consult the FHS mailing list.

3
  • FHS doesn't specify a /share, and /home is for actual system users home directories. /srv is specifically for 'data services provided by the system' Sep 19, 2009 at 15:24
  • FHS doesn't preclude the use of local standards: "Local placement of local files is a local issue, so FHS does not attempt to usurp system administrators." Sep 19, 2009 at 15:41
  • If you want to invent locations then that's fine, call it /mysambastuff, but the question asked about standards Sep 20, 2009 at 0:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .