Geek.Like.Todd

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.

http://sourceforge.net/projects/afpfs-ng/

you unzip those files into a directory, and cd into it, then type::
./configure
make
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/

 


0

Categorised as: Geeking Out | Linux


16 Comments

  1. David Smith says:

    Hi, I’ve tried installing this on 10.04 ppc, and I’m getting the error:
    “mount_afp: error while loading shared libraries: libafpclient.so.0: cannot open shared object file: No such file or directory”

    libafpclient.so.0 is present in /usr/local/lib/ (as a symlink pointing to “libafpclient.so.0.0.0”, a ‘real’ file in the same directory).

    Is this a path issue? How to fix?

    Thanks!

  2. Todd says:

    You should post that question here: http://sourceforge.net/projects/afpfs-ng/forums/forum/623356 on the help forums for afpfs-ng

  3. David Smith says:

    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.

    • Todd says:

      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).

  4. Bankim says:

    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
    Thanks

  5. Robert says:

    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!

  6. Donald says:

    I was able to mount the drive:

    donald@ubuntu:~$ sudo mount_afp afp://Donald:password@192.168.1.6/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 192.168.1.6 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!

    • Jesse says:

      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.

  7. Meine says:

    Thank You!

  8. 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

  9. Sylvester says:

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

  10. undertuga says:

    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…)

  11. 86Nestor says:

    I have noticed you don’t monetize your website, don’t waste your
    traffic, you can earn additional cash every month because you’ve got high quality
    content. If you want to know how to make extra $$$, search for: best adsense alternative Wrastain’s tools

Leave a Reply

Your email address will not be published. Required fields are marked *