Repository navigation
Using MacFile
Welcome to the Macintosh File Server (MacFile) for Haiku! This multi-threaded server, written from the ground up for the BeOS/Haiku, will allow Macintosh clients to share files with a machine running the Haiku OS. Once MacFile is installed, Mac clients can connect using their native AFP protocol to shares located on the Haiku machine.
Currently, MacFile implements the AFP 3.2 specification and is compatible with either Classic MacOS or Mac OS X clients. The only restriction is that the Mac clients must support AFP over TCP/IP (AFP 2.2 which first appeared in AppleShare 3.7.1 (MacOS 8.0) and later). Currently, for Classic MacOS on 68K systems, the only version of AppleShare that is supported is 3.7.1. PowerPC machines can use any version of AppleShare. See the Known Issues Wiki for more info.
As of version 1.7, MacFile supports the DHCAST128 user authentication method (UAM). This means that MacOS 9/X clients can login to MacFile using their own native password encryption implementation. With this support, you can now safely and securely login and change your passwords from any MacOS X system that supports the old filing protocol (up to and including MacOS X 10.5).
There is only a very rudimentary folder level security system provide in Haiku. You can only limit access to certain shares between three groups of users: Administrators, guests and users. See section 3 for a detailed description on how to configure your folders to restrict/grant access.
AppleTalk connections are not supported.
The following AFP API calls are not supported in MacFile. Note that the absence of all the API's below does not affect the usability of this server with Macintosh clients. The only reason I list these here is in case a developer tries to write a custom application that attempts to use these calls.
- FPOpenDir (not required)
- FPDirClose (not required)
- FPSetVolParms (irrelevant since BeOS doesn't support a backup date)
- FPDeleteID (don't have too according to spec - not possible with Be file system)
- FPExchangeFiles (not required)
- FPGetAuthMethods (irrelevant since BeOS doesn't support users)
- FPCatSearch (not required)
- FPCatSearchExt (not required)
NOTE: FPGetDirParms and FPGetFileParms were deprecated by Apple in early versions of the filing protocol and won't be supported.
To install MacFile, just double click the installer.sh script from within tracker or run it from Terminal. It will place all the files in their correct locations. Specifically, it places the following files:
home/config/non-packaged/apps/afp_server - this is the AFP server servicehome/config/boot/launch/afp_server - link so the server starts at boothome/config/non-packaged/apps/MacFile - this is the configuration utilityhome/config/non-packaged/deskbar/menu/Applications/afp_server - linkhome/config/non-packaged/deskbar/menu/Preferences/MacFile - link
As of version 1.8 for Haiku, the install script will automatically place a link to the afp_server application in the home/config/boot/launch folder so it will start up automatically at boot time.
Once MacFile is installed and running, you can use the MacFile preference application to configure and view:
- What directories you are sharing
- What users have access to your server via AFP
- What message (if any) users will see when they log in
- The name for your server that AFP clients will see
- Server statistics such as throughput, bytes transferred, etc.

MacFile provides a rudimentary user authentication system. With the preference application you can allow only certain users to access your AFP shares by entering user names and passwords. You can also tell MacFile who has admin privileges. Currently, "Admin Privileges" only means that users are listed as "owners" of the shares. This way, window positions and view settings on the client are saved between logins. Admins also ALWAYS get full access to all shares regardless of how you configured the folders using the method below. If you are not an "Admin", you are basically just a normal user.
MacFile uses Haiku's filesystem permission attributes to provide at least some rudimentary directory access control. Specifically, it uses the Posix permissions available in the filesystem to control access for guests and normal users.
Permissions are set as in the table below. Administrators always have FULL access to all shares and subdirectories, regardless of any permission settings. Normal user permissions are reported to the Mac client as they are set in the "Group" column. Since groups are currently not supported in BeOS, we borrow these settings for normal user access permissions. Guest access is controlled by the settings in the "Other" column. The figure below shows how MacFile views the permissions settings in a graphical manner.

In the example in Figure 1 below, users have full read/write access to the sample directory and guests have just read only.

The execute access settings are not understood by Macintosh clients, so we use this setting to determine whether or not Mac clients can view (search) the files in a particular directory.
Below is an example of how you would create a drop folder (users & guests can write to, but not read or see the folder's contents). In the below example, users and guests can copy files into a particular directory, but cannot open it to view it's contents. Note that you do not want to apply these settings to the root directory of a MacFile volume (the shared folder) otherwise users and guests will not be able to mount the volume.

In the above example, administrators (owners) continue to have full unrestricted access to all shares and directories on a particular server. The "Owner" bits are ignored at this time as their meaning is irrelevant.
The AFP spec allows the use of a separate name for the server from the one that may be set as the machine/host name. This is lucky for us on Haiku or BeOS as there is currently no way to set the machine's name or host name (easily anyway). By default, MacFile will use the hostname of the machine, but you can set a more unique name via the MacFile preference application. Just choose Utilities->Set Server Name... from the preference application menu.
If you wish to revert back to the default system hostname, just press the "Default" button in the Set Server Name dialog.
To access shares you have shared out on MacFile, open the Chooser on the Mac client (MacOS), or use server connect (MacOS X). On MacOS, use the Server IP Address button in the chooser to enter your Windows computer's IP address.

Enter the credentials for a Windows user account. It is recommended that you create an account specifically for logging into the server from a Mac. Remember you will be using old technology for encrypting your passwords between the Mac and this AFP Server.

Finally, choose the volume(s) you wish to mount.

Copyright (c) 2024, Michael J. Conrad