Mounting AFP File shares with Ubuntu Linux and Debian 6

I’m moving things from one machine to another and I setup an AFP share and not an SMB share on a mac where I need to transfer my files.. I could just turn on SMB.. but whats the fun in that?

To install AFP support for Ubuntu you must first install these packages:

sudo apt-get install libfuse-dev libreadline-dev libgcrypt-dev libgmp3-dev

Then you need to download the AfpFs-Ng source files from sourceforge and compile them.

you unzip those files into a directory, and cd into it, then type::
sudo make install
sudo ldconfig

Then to mount your share you type, as a regular user:

mount_afp 'afp://user:password@servername/sharename' /placewhereyouwannamountit/

To unmount you type:

afp_client unmount /mountname/

15 thoughts on “Mounting AFP File shares with Ubuntu Linux and Debian 6

  • Posted on 2011-12-30 at 15:54

    Hi, I’ve tried installing this on 10.04 ppc, and I’m getting the error:
    “mount_afp: error while loading shared libraries: cannot open shared object file: No such file or directory” is present in /usr/local/lib/ (as a symlink pointing to “”, a ‘real’ file in the same directory).

    Is this a path issue? How to fix?


  • Posted on 2012-01-03 at 08:08

    Hi Todd,

    Thanks for your quick response, and apologies for posting my support question here. FWIW, I forgot the last step, “sudo ldconfig”. With that applied, it seems to be working ok now.

    I’ll check out the forum with further support questions.

    Thanks again.

    • Posted on 2012-01-03 at 20:08

      No Worries, if I had known the answer then I’d have been able to help, but I’m just not the developer :) Glad to see it was just a permissions thing tho. All things are possible.. but only if you are root (or sudo).

  • Posted on 2012-01-08 at 08:59

    I was able to mount macbook’s folder on ubuntu
    now i reinstalled linux on my system
    again followed the same procedure
    but this time i am getting a weird error
    the mount is successful, but when i click the mounted drive it says “This file is of unknown type”

    Any help in this regard would be much appreciated

  • Posted on 2012-01-12 at 10:14

    Thanks for a good tutorial, helped a lot!

    I was just wondering, would it be possible to add this during start-up, maybe in fstab? So that it would mount every time i start my computer. If so, how?

    Thanks in advance!

  • Posted on 2012-04-22 at 22:44

    I was able to mount the drive:

    donald@ubuntu:~$ sudo mount_afp afp://Donald:[email protected]/Downloads ~/macAIR/
    [sudo] password for donald:
    The afpfs daemon does not appear to be running for uid 0, let me start it for you
    Mounting from Downloads on /home/donald/macAIR/
    Mounting of volume Downloads of server Donald’s MacBook Air succeeded.

    But my mount point is no longer accessible:

    donald@ubuntu:~$ ls -l
    ls: cannot access macAIR: Permission denied
    total 88
    drwxrwsr-x 3 donald donald 4096 2012-04-22 22:36 AFP
    -rwxr-xr-x 1 root donald 1768 2012-04-21 18:20 convertMP4
    drwsr-sr-x 2 donald donald 20480 2012-04-22 23:34 downloading
    drwxrwxrwx 1 root root 16384 2012-04-19 15:46 external
    d????????? ? ? ? ? ? macAIR
    drwxr-xr-x 2 donald donald 4096 2012-04-19 16:55 test
    drwsr-sr-x 2 donald donald 40960 2012-04-22 00:30 todownload

    any help would be greatly appreciated. Thanks!

    • Posted on 2014-12-08 at 02:59

      That’s because you’ve mounted the drive as sudo, so now only your root user has privileges. Just mount the drive as a normal user on a place where you have the permissions to create files.

  • Posted on 2012-11-28 at 11:30

    Thank You!

  • Posted on 2013-10-01 at 21:08

    Thanks for that. I had one problem (uname -a says Debian 3.9.8-1)
    make failed the first time with
    /usr/bin/ld: cannot find -lncurses

    i had to install
    sudo apt-get install libncurses5-dev

    • Posted on 2014-03-10 at 23:34

      At first i thought that you are a smmpaer but when i looked at the link wow i see that you are the monobristol creator :)I will send feedback later when i will start playing more with the tool Ahh and thank you for the comment

  • Posted on 2013-10-01 at 21:45

    oh… and how about this:
    gvfs-mount can do it (which means you can mount afp shares through the nautilus gui).[email protected]/2013-03/17153/%28Bug-962718%29-Re-mount_afp-fails-with-quot-Could-not-connect-never-got-a-response-to-getstatus-Connection-timed-out-quot-er.html

  • Posted on 2013-11-20 at 06:34

    Thanks so much. very useful!
    The AFP files are now compiled which makes it a bit easier too :)

  • Posted on 2014-06-12 at 07:53

    Nice find! Installed AFP with success @ some Raspberry Pi running Raspbian! No stress at all! MongoDB writing to the shared drive (way better than SD card speeds…)


Leave a Reply