CS3141 Team project directory

Fall 2013

Work space

If your team would like to have a shared space for your team project, please send email to ithelp@mtu.edu. You may also ask them to create a UNIX group for your team, so you can set the permission appropriately to allow ONLY team member have full access to the files. See next section about how to setup the permission.

Permission setting

Assume the directory is /classes/cs3141/project/group1 and your Unix group name is cs3141.1.

 

1.     Use ypcat to check who is in your group

$ ypcat -k group | grep "cs3141.1 " | sort

 

2.     Set the group owner of /classes/cs3141/project/group1 to be cs3141.1. Set the permission to be 775. Set the setgid bit on.

drwxrwsr-x 2 root cs3141.1 80 2009-09-08 14:23 group1

 

By default, when you create a new file, the group owner of the file will be your primary group. This will cause inconvenience to share files among team members. However, this default behavior can be changed by using the special setgid setting on the parent directory. With the setgid bit on, the group owner for new files will be the group owner of the parent directory, not the primary owner. The newly created directory will inherit this setgid bit too. 

 

3.     Change file permission

                        To grant the permission to the group owner, you can use the chmod command. For example,

                        To check the permission

[ruihong@icu5 c]$ ls -l s
-rw-------  1 ruihong cs3141g 0 Jan 18 12:57 s

              To grant the group owner read permission, run "chmod g+r filenames"

[ruihong@icu5 c]$ chmod g+r s
[ruihong@icu5 c]$ ls -l s
-rw-r-----  1 ruihong cs3141g 0 Jan 18 12:57 s


To grant the group owner read and executable permission, run the command "chmod g+rx filenames"
         [ruihong@icu5 c]$ chmod g+rx s

                        Please do “man chmod” for more information about chmod.

                        You may also change your umask setting. To know more about umask, read the online mannual.