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/
[amazon_link asins=’B017D20O26,1118999878,B01DTH45DS,B01GW0BPU0,B00XTTANW4,0134511182,0134268113,B01AZXX2CO’ template=’ProductAd’ store=’geekliketod04-20′ marketplace=’US’ link_id=’e6801eea-c786-11e6-a7df-5714f5456626′]
Categorised as: Geeking Out | Linux
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!
You should post that question here: http://sourceforge.net/projects/afpfs-ng/forums/forum/623356 on the help forums for afpfs-ng
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.
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).
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
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!
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!
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.
Thank You!
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
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
Stay with this guys, you’re helping a lot of people.
oh… and how about this:
gvfs-mount can do it (which means you can mount afp shares through the nautilus gui).
http://www.archivum.info/ubuntu-bugs@lists.ubuntu.com/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
Thanks so much. very useful!
The AFP files are now compiled which makes it a bit easier too 🙂
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…)
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