Mounting Your Unix Directory From A Mac


Basic Read Only Access

You can mount your graphics group unix home directory from a mac by going to the Chooser, Selecting AppleShare, Zone CS, Server UNIX. Use your unix userid and password. You should end up with a new volume on your desktop rooted in your home directory. Thats all you need for read only access to your unix files.

But I want write access...

The short answer is that you need to do this:
%cd
%mkdir .finderinfo
%mkdir mac
%mkdir mac/.finderinfo
%mkdir mac/.resource
You should now be able to create or copy files into the ~/mac directory using the mac. More/better/different is possible, see the man pages (pointers below).

What does it all mean...

The following is a gross simplification, but will do. Unlike unix, the mac stores files in three forks: data, resource, and info. The data fork stores data like text files, jpeg files, etc. The resource fork stores program code, and "resources" for the file. The info fork, stores information used by the finder to place the icon and window in the correct position. For the most part any files you transfer between unix and a mac had better contain only the data fork. Most ftp programs on the mac, basically ignore the info and resource forks when transfering files. So what if we want to store the info and resource forks on the unix box as well? We create the directories .finderinfo and .resource to store those parts of the file. So a file really resides in
~/mac/myFile
~/mac/.finderinfo/myFile
~/mac/.resource/myFile
Unless these extra directories exist, we cant write a file, because the Finder cant't figure out where to write its data. So if your dealing with only data files (and why would you want the resources on a unix machine?), its sufficient to make a .finderinfo directory anywhere you want to copy files.

Creators and File Types

The mac also has a notion of file creator and type. The creator is used to figure out which application to use when you double click. The type is used to specify whether its a text file or a jpeg, etc.. Unix has no such notion, so we need to create this info when we show files to the mac. Based on the file extension (.txt, .jpeg, .tiff) we set the correct values. System defaults are in /u/jedavis/lib/cap60/etc/afpfile, but you can override with a .afpfile in your home directory. Some applications are smart enough to ignore the 'type' and actually look in the file to see whats there.

EOL Translation

Unix use a LF for end of line, and a mac uses CR. Needless to say this is a headache. Ftp programs autotranslate this for you if you choose text mode. This file system assumes that it needs to do the EOL translation. This is good if you have a bunch of text files. It is not what you want if you have a data file (jpeg, tiff). The same file extension mapping mentioned above specifies that some file extensions should be treated as raw data, and not translated. Ive specified the common extensions I use, but you can add your own in a ~/.afpfile.

More info

This is all part of the Columbia Appletalk Package . CAP allows a unix box to speak Appletalk. A piece of this is AUFS, which creates an Appleshare volume. Man pages can be found in /u/jedavis/lib/cap60/man and ...
Last Updated Feb. 1, 1996 by James Davis