Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ afsd(8) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

atlookup(1)

atxadmin(1)

atconfig(8)

AFSD(8)  —  NEWS-OS Programmer’s Manual

NAME

afsd − AFP File server

SYNOPSIS

afsd [ −c ] [ −a ] [ −C ] [ −n server_name ] [ −s max_sessions ] [ −g guest_name ] [ −l log_level ]

DESCRIPTION

afsd is a server that uses AFP (AppleTalk Filing Protocol) to exchange data with client machines.  By using this server, NEWS can be made to function as a file server. 
Currently, AFP 2.0 is supported.  The only type of client is Macintosh.  MS-DOS and Pro-DOS machines are not supported. 
AFSD supports CD-ROM devices. Clients Macintosh can share CD-ROMs inserting CD-ROM drives of NEWS.

OPTIONS

−c CR/LF conversion is performed on all text files copied from server to client.  Note that no conversion takes place for data (binary) files.  If the option is not specified, no conversion is performed. 
The default value is “off”.

−a Any characters other than printable ASCII characters in client files are displayed in hexadecimal notation when saved on the server.  (No Japanese characters are displayed.) 
The default value is “off”.

−C This option allows any volumes that are used by CAP to be designated as Read-Only when they are mounted.  This option makes it possible for data created using CAP to be converted into data usable by afsd.  However, this option should be used only temporarily for converting data, not permanently. 
The default value is “off”.

−n server_name
Specifies the server name (object name) on the AppleTalk network. The type name (type) is AFPServer. 
The default name is <hostname> Sony NEWS. 

−s max_sessions
Specifies the maximum number of sessions that can be active at the same time.
The default value is 10.

−g guest_name
Specifying this option enables “anonymous” logins. The user specified as “guest_name” is used as the User ID of UNIX for anonymous logins. From the point of view of security, the use of this option is not recommended.
The default value is “off”.

−l log_level
A log is kept using syslog.  The currently supported log levels are 1, 2 and 3. 
Level 0 is to keep afsd start and stop messages only. 
Level 1 is to keep each session’s start and stop messages and level 0 messages.
Level 2 is to keep mount/umount history and level 1 messages. 
The default value is log level 0.

USERS AND GROUPS

For an AFP client to connect to the server, a username and password are required.  afsd uses usernames and passwords without any modification of UNIX.  The group ID on the server can also be used without modification.  Consequently, users and groups can be registered in the same way as normal registration of UNIX users: by editing /etc/passwd and /etc/group. 

USER VERIFICATION

User verification metherod is the same as that of the native UNIX.  Users connecting to a server must have an account on that server.  However, if the "anonymous" user function is used, users without accounts can be allowed limited access to the system.  The UNIX password entry is used without any modification. Also as in UNIX, connection to the server is not possible if the password field contains the character “∗”. Users lacking passwords cannot connect to the server.

HANDLING OF ANONYMOUS ACCOUNTS

afsd allows the setting up of an anonymous account that does not require a password to be entered at the connection time.  (Such an account is displayed as guest on the client, but here the term “anonymous” is used to avoid confusion.) 
However, due to security considerations, UNIX does not allow accounts of this type to be set up. In order to simulate an anonymous login, afsd includes an option that allows an account to be specified as the equivalent of an anonymous account and facilitates connection to it. 
However, there must be an entry for this account in /etc/passwd.  Also, even if this user has a password, afsd will not ask that it be input. 

FILE SYSTEM STRUCTURE

AFP clients can mount the server’s disks a volume at a time.  Under a volume are created directories and files in successive layers. 
afsd allows any directory on the server to be specified as a volume and UNIX directories and files are allocated to the AFP client as its directories and files. 
Read/write access authorization for each volume is dependent on the access authorization of the connected user for the directory in question. Individual passwords can be specified for different volumes.
 

VOLUME SETUP PROCEDURE

The following procedure can be used to set up a volume.  Setting up a common system volume

afsd allows a volume to be specified as shared by the system (called public mount).  This is accomplished by making an entry in /etc/afpexports. 
The format of entries in /etc/afpexports is as follows.  <target directory>:<Volume name>:<passwd(option)>:<user list(option)> Example /export/mac:NEWS Public:Sdoojdcvdi:david,antonio,thompson This indicates that the directory /export/mac can be mounted using the volume name “NEWS Public”. 
<user list> may be omitted.  In this case the volume can be used by all users with usernames not not listed in /etc/afpusers. 
If <user list> contains some type of indication, only the users listed can mount the volume.
In the above examples, the only users who can mount the volume are david, antonio and thompson.
<passwd> can also be omitted.  This will cause an encrypted password to be entered.  At present the only way to set this password is via atxadmin.  Setting up separate volumes for individual users

It is possible to create separate volumes (called private mounts) for individual users on the server which are used when those users connect.  A file, ~/.afpexports , is set up in each such user’s home directory containing a mount list.  The format for entries is the same as that for /etc/afpexports, except that <user list> is ignored. 
If this file is missing only a public mount is possible.
 

CD-ROM setup

afsd can support CD-ROM. To make sharing, in /etc/afpexports the following description is needed.  /dev/sd06c:CD-ROM:: /dev/sd06c is a device name of CD-ROM drive. Volume name should be "CD-ROM". afsd automatically analyses CD-ROM volume and shows volume-list to users. <user list> and <passed> are also supported. In need of security, they could be useful.
CD-ROM can be ejected and changed when nobody mounts CD-ROM. Also afsd can support multiple CD-ROM drives. For example, /dev/sd06c:CD-ROM::
/dev/sd04c:CD-ROM::

DENIAL OF ACCESS

afsd uses the account names on the server without modification.  Furthermore, since access privileges are transferred as is, there is a provision for specifying specific users to be denied access unconditionally for security reasons. 
Users listed in the file /etc/afpusers are automatically prevented from connecting with afsd. 
Example root
uucp
daemon In the above example, the users root, uucp and daemon cannot access via afsd. 

FILE FORMAT

Here is a brief description of the format in which Macintosh files are written on the server. 

Basically, Macintosh files consist of two parts: a data fork containing the main data of the file and a resource fork containing information on attributes, etc.  essential to the file. 

afsd separates one file into its data fork and its resource fork segments and stores them as two separate files. 

afsd stores the data fork under the original filename in the specified directory.  The file containing the resource fork is created in the .afprsrc directory.  Access privileges (file mode) for both files is the same. 
Also, files from the client are stored on the server as directories.
Example Assume that the files SuperData and WriteData as well as the folder Myfolder are stored in the directory /export/mac.  The actual items saved on the server in this case are listed below. 

/export/mac/SuperData
/export/mac/WriteData
/export/mac/.afprsrc/SuperData
/export/mac/.afprsrc/WriteData
/export/mac/Myfolder/Myfile
/export/mac/Myfolder/.afprsrc/Myfile

An addition to the above, a directory called .finderinfo is created for each file and data used by finder on the client is stored in it.  Finally, for each volume the files .ADeskTop, .IDeskTop and .TDeskTop are created.  These files contain data used internally by afsd. 

These setting can be made using atxadmin easily. 

EXITING

afsd forks one process for each session.  If SIGHUP is sent to the parent process, all of the sessions are terminated immediately.  Under the default setting, sending SIGTERM causes the sessions to be terminated after five minutes have elapsed and massages to that effect to be sent to the clients. 

NOTES

UNIX files can be made available to the client for reference by copying them as data forks to the directory corresponding to the mounted volume.  However, as such files contain no resource or finder info, afsd makes the assignment Creator=sony and specifies Type as TEXT, DATA, DEV, SKT or DIR, (DIR is normally seen as a folder, however, afsd may assign internal type DIR.)  as appropriate based on the UNIX file system data.  It should be kept in mind that the settings for Creator, etc.  are meant to be only temporary and that there is a danger that other applications might use similar settings. 

Specifying the option −C activates the CAP compatibility mode.  In this mode afsd handles volumes created using the standard structure of the CAP 6.0 software.  There are sometimes cases, however, in which the volumes created are unreadable due to modifications to CAP 6.0 or the installation procedure used.  In other words, this mode is not guaranteed to provide compatibility with all CAP versions. Also, since the CAP data is converted to afsd format in a transient manner, drives can be mounted only as read-only. 

Multiple afsd running on the same machine may cause the inconsistency of shared files. 

SEE ALSO

atlookup(1), atxadmin(1), atconfig(8)
 

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026