1

This is a bit vague of a question, as I could just create a folder anywhere in the filesystem and set the permissions accordingly. However, I would like to know where the "correct" location to place shared media in the Linux filesystem hierarchy would be.

In my case I have a single machine with a user for personal/recreational stuff and a work user. I have my entire music library duplicated in each users home directory, but it is not really an optimal solution in the long term with regards to adding music.

My initial guess would be to place a folder in /usr, since the data is mostly static. But in the case where I would like to share other items, for instance documents, between the two accounts, should the share then rather be created in /var, or is /opt a better place for a shared drive/folder?

  • If you're looking for some standards-specified location, /usr and /opt are out (the former is read-only and the latter is reserved for application installation), according to the FHS. – muru Dec 3 '14 at 14:19
  • Are you the only 2 Users on the system? If so, delete a duplicate, and make your work user a member of your home users group. After doing so, your work user can access and modify your home users files. – eyoung100 Dec 3 '14 at 15:11
  • Delete one of the music collection. Next create a new group (call it music) and add both users to this group. Change the group ownership of all your music files to music and both accounts will be able to access it. – garethTheRed Dec 3 '14 at 16:42
1

There are as many answers to this as there are linux servers out there.

Personal advice is to do it one way and then stick with it.

My personal setup is inherited from ubuntu (as it was once upon a time); all my data is stored in an LVM volume group, so each data category has its own LVM drive. I.e music is on the 'music' drive, movies on the 'movies' drive etc. Thus it is logical that I share each of them from their mount points. In the ubuntu-world, removable media used to be in the /media/ folder; i.e. /media/music /media/movies etc.

Nowadays removable media is mounted a bit differently (/media/username/drive I think), but I stick to the old way as it works well for me.

Then all the other things with user & group permission mentioned above is of course required so all the different users can access the data.

My $0.02 Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.