afpfs-ng 0.8.1

An open source client for Apple Filing Protocol


 

Where can I get it?

Download source, Fedora Core 8 RPMs and Ubuntu/Debian packages at  the Sourceforge download page

For details on the development project, check out the Sourceforge development page.

What is it?

afpfs-ng is a client for the Apple Filing Protocol (AFP) which will let you mount and access shared volumes from Mac OS X (or netatalk) to Linux, BSD and Mac OS X systems. 

There is a FUSE-based client which lets you mount a remote filesystem.  It is for Linux and FreeBSD.

There is also a simple, command-line AFP client; think about it as an FTP client for AFP.

How does the FUSE system work? 

Here, you'll see me mount a remote volume: 

$ mount_afp afp://adevries:passwd@10.211.55.3/adevries /tmp/xa20
Mounting adevries on /tmp/xa20
Login message: This is a login message.
Actually mounting.
Mounting succeeded.


At this point, the files on /tmp/xa20 will behave like any other network filesystem, with changes being reflected on the server.  As an example, I'll do a directory listing:

$ ls -l /tmp/xa20
total 0
drwx------  3 adevries adevries       58 Nov  6 18:24 Desktop
drwxr-xr-x  2 adevries adevries       24 Nov  9 19:28 destdir
drwx------  3 adevries adevries       58 Nov  6 18:24 Documents
drwxr-xr-x  2 adevries adevries       24 Dec 18 17:19 foo
drwx------ 17 adevries adevries      534 Nov  6 18:24 Library
drwxr-xr-x 27 adevries adevries      874 Feb  9 17:23 linux-2.6.18
-rw-rw-r--  1 adevries adevries 41863580 Jan 30 18:51 linux-2.6.18.tar.bz2
drwx------  3 adevries adevries       58 Nov  6 18:24 Movies
drwx------  3 adevries adevries       58 Nov  6 18:24 Music
drwx------  3 adevries adevries       58 Nov  6 18:24 Pictures
drwxr-xr-x  4 adevries adevries       92 Nov  6 18:24 Public
drwxr-xr-x  5 adevries adevries      126 Nov  6 18:24 Sites
drwxr-xr-x 14 adevries adevries      432 Dec 15 05:55 testdir

I can also see connection information:

$ afp_client status
AFPFS Version: 0.8.1
UAMs compiled in: Cleartxt Passwrd, No User Authent, Randnum Exchange, 2-Way Randnum Exchange, DHCAST128, DHX2
Server testserver
    connection: 10.211.55.3:548 (active)
    using AFP version: AFP3.1
    server UAMs: Cleartxt Passwrd, DHCAST128 (used)
    login message: This is a login message.
    type: Netatalk
    signature: 00017f0000017f0000017f0000017f00
    transmit delay: 0ms
    quantums: 303840(tx) 131072(rx)
    last request id: 20496 in queue: 1
         request 20496, afpEnumerateExt2
    transfer: 2486898(rx) 943164(tx)
    runt packets: 0
    Volume adevries, id 2, attribs 0x6c mounted: /tmp/xa20
        did cache stats: 1255 miss, 17380 hit, 912 expired, 0 force removal
        uid/gid mapping: Common user directory (500/500)
        Unix permissions: Yes, Netatalk permissions broken: Unknown

    Volume Test Volume, id 0, attribs 0x0 mounted: No

How do I automatically mount my filesystems with FUSE?


This is pretty simple:
  • create a file called '/etc/fuse.conf' with one line: 
user_allow_other
  • make sure that any user doing a mount is a member of the group 'fuse' so it can read and write to /dev/fuse
  • create an entry in /etc/fstab entry in the following format:

afpfs#afp://username:mypass@10.211.55.2/alexdevries /tmp/xa20 fuse user=adevries,group=fuse 0 0 

Here, alexdevries and mypass are the login information on the server 10.211.55.2.   The volume name is also alexdevries.  /tmp/xa20 is the name of the mountpoint.  The user= field is the local user, group needs to be the same the group owner of /dev/fuse.

Yes, you will need to put your password in clear text.  There is currently no facility to handle open directory.  Patches welcome. 


What can I do with the command line tool?


The command line tool is a simple client used to transfer files to and from an AFP server.  It has very few dependencies, and runs on Mac OS X.

Some examples:

$ afpcmd afp://adevries:lollipop@10.211.55.3/adevries/linux-2.6.14.tar.bz2 . 
Login message: This is a login message.

Connected to server testserver using UAM "DHCAST128"
trying to find adevries
comparing adevries with adevries
Connected to volume adevries
    Getting file /linux-2.6.14.tar.bz2
Transferred 39172170 bytes in 5.117 seconds. (7655 kB/s)

How good is it? 

afpfs-ng is officially labelled as beta, but there are few obvious file-level bugs.  There are problems within the FUSE libraries which cause afpfs-ng to hang or stall.

You should report bugs by either subscribing to the project mailing list (available on the afpfs-ng project webpage), or to alexthepuffin@gmail.com

General comments are appreciated also. 

What's next?

Major features that are coming up are:

  • extensions for graphical clients (gnome-vfs2, konqueror) so that one can browse AFP shares and show resource fork data
  • support for older Mac OS 8 and 9 servers (AFP 2.x)

Who wrote this?

afpfs-ng was started by Alex deVries with contributions from Michael Ulbrich, Derrik Pates and others.