HOW-TO: Make the Shared directory behave as a truly shared directory.
Many users wish to be able to collaborate with their fellow users by sharing files hosted on a central workstation or server. With Mac OS X this isn't as easy as it may sound due to multi-user permission safeguards. This HOW-TO shows how to set up a Mac OS X 10.2.3 workstation to have it's Shared folder available to any user in the "staff" group, whether they log into the machine remotely for file sharing or if they log into the machine directly. This HOW-TO assumes that the machine is a new installation and that the Shared folder is empty.
1) All users who expect to have access to /Users/Shared/ must be in the "staff" group. They will be members of this group by default if added as OS X users through the GUI.
2) /Users/Shared/ must be owned by the group "staff". To make this change, execute the following command from the Terminal:
sudo chgrp staff /Users/Shared
3) /Users/Shared/ must have Read and Write access for its group "staff". By default it has "Read only" access for its group. This change must be made from the Terminal. To make this change, execute the following command from the Terminal:
sudo chmod g+w /Users/Shared
4) /Users/Shared/ must have the "sticky bit" turned off. To make this change, execute the following command from the Terminal:
sudo chmod u-t /Users/Shared
5) Each file by default needs to have group write permissions. This is not the way Mac OS X 10.2.3 ships. To change this default behavior, do the following:
a) You'll need to edit the /etc/rc file by executing the following command from the Terminal:
sudo pico /etc/rc
This will bring up the PICO text editor in your Terminal. You may need to provide an administrator password if prompted you for one.
b) Next, scroll to the bottom of the file using PICO's built-in shortcut, Control-V. The end of the document will looks something like this:
# Set language from CDIS.custom - assumes this is parse-able by sh
. /var/log/CDIS.custom
export LANGUAGE
SystemStarter -g ${VerboseFlag} ${SafeBoot}
exit 0
c) You need to add the following command after the line with "export LANGUAGE". Use the arrow keys to move as needed and hit return to insert some lines:
umask 002
The resulting file will have an ending similar to this:
# Set language from CDIS.custom - assumes this is parse-able by sh
. /var/log/CDIS.custom
export LANGUAGE
umask 002
SystemStarter -g ${VerboseFlag} ${SafeBoot}
exit 0
It's important to have the "umask" line directly before the "SystemStarter" line.
d) Now you need to save the file. Hit Control-O to save the file. You'll have to confirm the name by hitting return.
e) Next, hit Control-X to leave the program.
6) Restart the machine.
7) You may wish to at this point set certain users' home directories to be /Users/Shared/ itself, thus preventing confusion when logging in through file sharing.* This can be done from the GUI with the NetInfo Manager utility, found in /Applications/Utilities/. This is not advised, as problems can arise if one of the users logged in at the workstation itself; the users would all be sharing the same home directory, preferences, etc. However, if interested, follow the following steps from NetInfo Manager:
a) If the lock icon is closed, click it and provide an administrator password.
b) You will be presented with a four-paned window: three panes across the top, and across the bottom. In the upper left-most pane, click the slash symbol ("/") if it is not already selected.
c) A list will appear in the upper middle pane. Click the "users" item from this list.
d) A list of users will appear in the upper right-most pane. Select a user to modify by clicking the user's name.
e) A list of properties and values will appear in the bottom pane. Scroll down the list until you see the "home" property. Double-click on home's value, which should be in the form "/Users/username".
f) Change this value to "/Users/Shared", omitting the quotes.
g) Save these changes by hitting Command-S, or choosing Save Changes under the Domain menu at the top of the screen.
h)You will be asked to confirm the modification. Click "Update this copy" to continue.
i) Repeat steps d - h for each user you wish to modify.
j) Click the lock to insure no further changes are made.
* NOTE: A preferred method would be to install a second hard drive, or repartition an existing one, and set up the new drive in a similar manner as /Users/Shared/. In this case, each user would keep their separate home directories. The new volume would appear in their file sharing volume selection screen.