Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

There is a server with several users.

A user may want to read another user's files (few gigabytes) and may want to put processed files in other's directory.

What's the common practice to do it? I can think of create a /share folder and make it rwx to all. Is this the common practice?

share|improve this question

marked as duplicate by Gilles, slm Feb 26 '15 at 21:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You need to define "accessible" in more details. Does /tmp serve your purpose? – alex Jun 8 '11 at 5:48
By access, do you mean read access, or read access + write access? Or something else? – Faheem Mitha Jun 8 '11 at 6:50
up vote 1 down vote accepted

I think you are searching for /usr/local/share/ but it is hard to answer since this depends on what kind of file your are planning to "share" between users.

But if we are talking about office files or something like that maybe you should use use some kind of revision system like subversion or git. And then the users will have a checkout/clone in their homedir.

Update: A way to make this a little bit better could would be that every user gets it's own subdir in the shared folder. He is allowed to write in his own folder but not the other subfolders. And all users are allowed to read from all the directories. That way you don't have to think about file collisions if two users use the same filename, or deletes the colleges files by mistake.

Btw the idea behind /usr/ is described in the Filesystem Hierarchy Standard ( http://www.pathname.com/fhs/2.2/fhs-4.1.html )

-"/usr is shareable, read-only data."

So I would probably use a dir in either /home/ or /var/ instead...

share|improve this answer
I think /usr/share/ and /usr/local/share are commonly used to store files shared between software packages, not users. – Shadur Jun 8 '11 at 6:41
/usr/share is for files provided by the package manager, /usr/local/ is for files related to some application not handled by the package manager. But you should not put office document in there or something like that... But this question is quite vague on what files he plan to share. – Johan Jun 8 '11 at 6:45
I concur. It's hard to give a useful answer until the question makes sense. – Shadur Jun 8 '11 at 6:51
No, /usr/share or /usr/local/share are unrelated to sharing between users. They're part of the system installation; share here means that the files can be shared between multiple architectures, on networks with heterogeneous hardware. Under Linux /usr is for files under the package manager's control and /usr/local is under the control of the system administrator. – Gilles Jun 8 '11 at 22:32

For occasional use, the common practice is that each user creates files in their own home directory. ~/pub is a common name of a directory for files all other users are supposed to be able access. If only a subset of users may access certain files, use groups or access control lists to manage permissions.

For more advanced use, when multiple users may work on the same file, use a version control system. There's no really standard place to store the (master) repository; I've seen repositories under ~someuser/$project, /net/repositories/$project, /srv/repositories/$project, /var/www/$project, /home/$project, etc.

share|improve this answer

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