Group Sharing a Directory


Normally, a directory is created with full access granted only to the owner of the file. To share the files in a directory, you must "open" access modes to a group and/or others. To open a directory, you must change permission modes. There are three questions to ask when deciding on which mode to change.

  1. Do you want to enable other users to see the file names in the directory? This is called read access or r.
  2. Do you want others to be able to put files in this directory? This is call write access or w.
  3. Do you want to let others get to the contents of the directory? This is call search access or x.

This document is a case study of a situation where you have a public directory, for example, a Web directory containing Web pages. You want everybody to have read and search access to these files. The second assumption is that you are working in a group, for example, a Web development team. You have a UNIX group created for your team. You want all members of the group to have equal and full access to all the files in the directory. Any member can create files and modify files created by other members of the group. Conversely, anybody not in the group can see the files, but they can not create new content, delete files, or modify existing files.

Using the letter codes above, we want the owner of each file to have full access, every other member of the group to also have full access—rwx—and all others to have browse access—r-x. We want this access automatically granted when new files are added. The group members can use any method to put the files in the directory, and the files will all be set consistently and correctly. For example, the Web development team might be publishing the files using the sftp protocol.

The owner of the directory always has the ability to change the permission modes of the directory. So if things are not working, the owner of the directory will have to log in to UNIX and follow the directions in this document. Other members of the group can work in this directory using a Web browser for browsing and sftp for publishing.

Case study