A Transparent UNIX/PC Conncection via NFS
To an MS-DOS user trying to share files with an ongoing
the never-ending file transfers required can get frustrating.
(File Transfer Protocol), which is widely available
and allows users
to transfer files ad hoc from one type of system to
another, is not
an acceptable day-to-day method of data entry.
This article details a method of ending the "FTP-shuffle"
by means of the also widely available NFS (Network File
I implemented FTP software's PC/TCP-Interdrive NFS solution
to a request from the Chatham County Tax Assessor's
office for a system
that would allow them to scan property photographs directly
MS-DOS PC to an AIX filesystem. The plan entailed scanning
MS-DOS PC using inexpensive color scanners (HP ScanJet
II) and the
free scanning software that comes with them.
The FTP route was rejected as time-consuming and requiring
training. Instead, the office requested a remote filesystem
and to help with its implementation, the Chief Assessor
logical method of organizing the images -- there would
be thousands -- so that no one directory would get too
The photos would be scanned into a multi-level subdirectory
upon municipality, map number, and parcel number. With
structure specified, the only thing left to do was to
NFS system that would act exactly like each clerk's
Given the office system's infrasturcture, there were
two options available
for implementing the cross-platform NFS. One option
was to use a "server"
architecture (I use the term loosely). This would be
an NLM (NetWare
Loadable Module) product that would run on one of the
The users would treat the NFS-mounted volume the same
way they would
any other Novell files. The other option was to use
an MS-DOS NFS
client, which would involve loading appropriate drivers
We chose to use an MS-DOS NFS client. Doing so bypassed
box entirely, and would be more efficient in terms of
and software overhead (see Figure 1).
After some research into available client-based NFSs,we
that the solution was already installed on our network
Our office has a site-license for FTP Software's PC/TCP,
complete TCP/IP implementation that coexists nicely
with Novell drivers
on a user's PC. Thus far, we had used PC/TCP only for
and FTP. We also used it as the TCP/IP stack for application
such as AGE Logic's Xoftware X-Windows server and Unisys's
that uses TCP/IP as its transport medium. NFS services,
by FTP Software, were included right along with the
Before attemtping to configure all the scanning stations
I ran a pilot program. For my test I configured the
Tax Assessor "taxonomy"
AIX host to export the image filesystem. Then I configured
PC for Interdrive operation. This turned out to be amazingly
I configured AIX to allow the scanning stations to mount
filesystem by adding a line to the /etc/exports file
Figure 2). I then ran the exportfs command to tell NFS
I had made a change. (You need to run exportfs by hand
if you don't want to reboot -- AIX will run exportfs
you when you reboot and export all the file systems
listed in /etc/exports.)
Other types of UNIX NFS servers look at the datestamp
of the /etc/exports
file each time somebody tries to mount a filesystem;
they reread the
file if the stamp has changed.
I could have used the AIX system management tool, smit,
add the permissions, but I prefer to use the command
line to explicitly
tell AIX what I want to do. If you prefer to use smit
your NFS system, use the following chain of menu choices:
Communications Applications and Services
Network File System (NFS)
Add A Directory to Exports List
Then fill in the screen appropriately, and hit ENTER
to commit (see Figure 3).
If you have a different version of UNIX, such as Dynix,
the /etc/exports file is your only option. Consult your
documentation to make sure that this is appropriate
and see Figure 2
for an example entry).
Most systems (such as AIX) ship with NFS configured
to be self-starting.
You can usually check this by typing
ps -ef | grep nfsd
and seeing if there are a few nfsd processes
hanging around. If not, your system is not configured
to act as an
NFS server, and you may have to edit the appropriate
files: /etc/rc.nfs for AIX, /etc/rc2.d/SxxNFS for
System V-style UNIX. Make sure that the lines that invoke
rpc.mountd, rpc.statd, and rpc.lockd are all
uncommented. (Again, consult your system documentation
on starting NFS on your particular system.)
DOS Client Configuration
I used FTP's KAPPCONF utility to configure my test PC.
a setup program that edits your pctcp.ini, which is
very much like win.ini or system.ini. KAPPCONF adds,
deletes, or modifies stanzas depending upon what part
of PC/TCP you're
configuring. Using the menus, I told it that I wanted
to mount a filesystem
called "images" from the UNIX server called
onto the MS-DOS drive D:. I could have done this for
any type of UNIX,
not just AIX. I accepted the default values, and KAPPCONF
my pctcp.ini accordingly. I saved the additional stanzas
a file (which I called idrive.ini, but you could call
you like) so that I could concatenate them to the scanning
pctcp.inis later (see Figure 4).
I ran the NFS support driver, an MS-DOS driver called
idrive. I Then
tried mounting the filesystem using the PC/TCP idmnt
mount -all) command, only to get a "permission
I realized that I was using the wrong name for my PC
in the AIX hosts
file, so I changed it. Bingo! It worked.
I played around with this for a little while, in Windows
and in DOS,
using various applications to see how robust it was.
I did discover,
after perusing the PC/TCP README files, that while PC/TCP
using the UMB and EMS for its buffers, this is not only
a bad idea
under Windows, but is strictly forbidden. Apparently,
there is a known
bug in the PC/TCP kernel that does not interact well
when it is using anything but standard memory. To protect
unexpected events, set any use-emm settings to "no"
in your pctcp.ini file if you want to use it with Windows.
Another requirement for using PC/TCP with Windows is
that you must
load PC/TCP's virtual 386 driver in the [386Enh] stanza
of your system.ini.
Also, remember to have a search path to the home directory
Our site uses the Novell command
so that the necessary PCTCP DLL files are locatable
FTP also recommends adding a VPCTCP stanza to your system.ini
possible software conflicts (see Figure 5).
Once we had finished testing, I modified the boot floppies
stations that would be scanning to include the necessary
(Figure 4). This merely required concatenating the stanzas
station's already existing pctcp.ini.
Because we were concerned about MS-DOS base memory and
could not load
the drivers "high," I included the idrive
-a commands in each station's Windows startup batch
file. At the
end of the batch file, I included commands to unload
the drivers when
the Windows session was done (see Figure 6 for a sample
Memory-conscious administrators may want to note that
did not need QEMM for this particular application, it
works well with
PC/TCP and InterDrive.
The client stations are up and running and scanning
away as planned.
However, the J. Edgar Hoover types among you will have
the MS-DOS clients are mounting the UNIX filesystems
with very little
in the way of security (hostname only). This is in large
NFS doesn't have terribly good security in the first
place. A further
protection is that most users are incapable of the hostname-masquerading
it would take to break this simple security.
We have, however, drawn a line of demarcation between
data and the images by giving the images a separate
mapping data is not available for NFS export to anybody.
security is available under PC/TCP, but we chose not
to use it. (Most
users have a plethora of passwords already. Moreover
users can't even
access the idrive or idmnt commands unless they log
into the Novell network.)
I leave the implementation of a more secure MS-DOS/UNIX
as an exercise for the interested reader. Note, however,
methods differ and can be vendor-specific, as in the
case of IBM's
Secure NFS. Be aware that other methods (such as user/password
are easily compromised by the sophisticated user.
About the Author
Jonathan Feldman works with UNIX and NetWare at the
Government in Savannah, Georgia. He likes to keep things
simple so that
even he can understand them. In his spare time he writes,
roses and babies. He can be reached at 912/927-2096