Sharing Stored Files
Sharing some stored files with one or several other users is one of the most common storage goals. You may also want to consider using other file-sharing techniques available on LC production machines. Consult the File-Sharing Alternatives section of EZFILES for an overt analysis of several choices.
All sharing of stored files on LC's HPSS happens by means of storage groups. You and those with whom you want to share stored files must first find or create an LDAP (Lightweight Directory Access Protocol) storage group to which you all belong, assign the files to be shared and every parent directory of them to that common storage group, and open the file and directory permissions (of the whole tree) to allow group reads (executes, or writes). Please note that users on the Restrict Zone (RZ) may not share stored files in their home directory.
sUsing Storage Groups
A group is just a named set of users that agree among themselves to optionally allow (some of their) files to be readable, or even writable, by all group members. At LC, online groups (e.g., on either an AIX or Linux cluster) are obtained from LDAP. For most LC users, your online and storage groups will have the same name, and those groups will have the same sets of members online and in HPSS. However, a file loses its group status at the time you store it, so you must arrange the sharing of stored files by working exclusively with groups. For basic information about using groups, see the Using Groups section of EZFILES.
Setting Stored-File Permissions by Group
Once you have the files you want to share and the name of a group to whom all sharing users belong (see the previous subsection), you can follow these steps, all involving (somewhat unusual) FTP commands, to enable the sharing of stored files.
1. Open an FTP session to storage.
2. Create a storage directory to hold the shared files. In this example, the shared-files directory is called "share" and the shared file is called "share.code." In your FTP session type
3. Assign your storage home directory to the share group. For example, if your default arrival directory in storage is /users/u34/jfk and if the storage group containing all the file-sharing users is "sgroup," then use this FTP command
chgrp sgroup /users/u34/jfk
to associate the two. One side effect is that you cannot share with two different groups at once.
4. Assign your file-sharing directory to the share group. Because you made the share directory as a child of /users/u34/jfk in step 2, you can now associate it, too, with the file-sharing storage group sgroup:
chgrp sgroup share
5. Assign group permissions to the file-sharing directory. To allow other members of storage group sgroup to read, write, and execute (list) the file(s) in the share directory, use this FTP command
chmod 775 share
to expand its default group permissions.
6. Store the files to be shared. If you move (cd) to the file-sharing directory and put the file(s) to be shared, they will lose their online permissions but they will arrive associated with the share group sgroup, which they inherit from the file-sharing directory:
put ... [if there are more files to share]
7. Assign group permissions to the file(s) to be shared. Even if their online permissions allowed sharing by group, storing the file(s) erased those decisions. So as with step 5 above, you need to declare the availability of each file to the members of sgroup:
quote site chmod 775 share.code
Reading Shared Stored Files
After you have used the previous two subsections to enable others in storage group sgroup to share the file(s) in the share directory, they can follow these steps to retrieve those file(s):
Note that attempts to directly get the file /users/u34/jfk/share.code (while in another storage directory) may misleadingly fail with the message "no such file or directory."