1

I have read the Linux Filesystem Hierarchy

I found an operative statements to be

For /mnt it notes some distributions create automount directories for floppies and cdroms there (and one should probably not assume that list is complete in terms of distributions using /mnt or the directories they use, imho)

for /srv the LHS states

Distributions must take care not to remove locally placed files in these directories without administrator permission.

I also looked these up

Why have both /mnt and /media?

What does/will the directory /srv contain?

It appears (largely through observation) that ubuntu performs automounts into /media/{administrator/user} (if true, better than /mnt)

It also appears that Ubuntu appears to have left /mnt entirely to the user or administrator to control -- (in total compliance with the LFH , imho, and if true, the answer I seek).

/srv according to the Linux Filesystem Hierarchy has shared control by the distribution and the administrator/user.

Now I want to create directories on a user data for a file server, user media for a media center, directory for source control, etc. Many of these directories will be on devices other than the boot device

If ubuntu as I have surmised does not use /mnt for anything that could be the best location for my various subdirectories (as they will be mounted and will not conflict with ubuntu's distribution directories).

/srv if not used by ubuntu, or if there are recommended names for administrators/users in the /srv directory may be a good choice too even though these directories will be mounted.

Basically my question is which is the better directory for administrator/user directories to avoid potential conflict with directories created by the distribution when required?

Thanks in advance for considering this.

1 Answer 1

2

It appears (largely through observation) that ubuntu performs automounts into /media/{administrator/user} (if true, better than /mnt)

  • /mnt used to be for fixed disks (hdd, sdd) but it is discarded nowadays in favor for user defined partitions (ie a mountpoint in /).
  • /media for removable media (cd, dvd, bd, usb)

/srv if not used by ubuntu

Not by default; it is for services to use and those you install as extra software. /srv has a couple of note in the FHS:

One method for structuring data under /srv is by protocol, eg. ftp, rsync, www, and cvs

Data that is only of interest to a specific user should go in that users' home directory. If the directory and file structure of the data is not exposed to consumers, it should go in /var/lib.

So the use case for the directory is limited as it as.

A couple of examples: cgi scripts, ftp downloads and such.

Now I want to create directories on a user data for a file server, user media for a media center, directory for source control, etc. Many of these directories will be on devices other than the boot device

You can use /srv/ for that. The idea is to create a sub directory based on protocol in there.

I would use a different disk or partition for this though and create a new directory in / specifically for this that is used as a mount point with a name you make up. 100% guaranteed no default is going to touch that mount point (Ubuntu/Linux will stick as close to the FHS layout)

1
  • Thanks -- that covers it completely.
    – pasha19
    Nov 10, 2021 at 19:11

You must log in to answer this question.

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