If you are going to be working in a group for your projects, you might
want to be able to share files with your group members. This will
allow group members read (and write, if you'd like) access to project
files.
Here's what you need to do:
Form your group.
Request the creation of a Unix group for a class project.
You'll need to contact Mary Bailey for this. She will need the
usernames of your group members.
Once the group has been created, new login sessions for all
group members will include group permissions. Try the Unix command
groups to see which groups you are in. Your new group should be
listed.
Pick a location for your group's work. This will be in a group
member's account. Create a directory.
Change the permissions on the directory to permit access to all
group members. The following assumes you want to add read/write
access for all group members of group 338grp on the directory
338proj.
Change group ownership of the directory: chgrp 338grp
338proj
Permit group read/write/execute: chmod g+rwx 338proj
Set the "setgroupid" bit on the directory. This will force
any files and directories you create inside of 338proj to
have group ownership 338grp: chmod g+s 338proj
Remove all permissions from non-group members: chmod
o-rx 338proj
All of the chmod steps above can be combined into a single
command: chmod 2770 338proj - see chmod(1) for details.
ls -lg will list your files including group information.
Make sure group members have appropriate permissions on the
parent directories that will allow them to cd to the group
directory. The requires only world execute permissions, but not read
permissions on parent directories. This will allow cd, but not
ls.