Accessing AFP Shares Over Local Network


5 posts
by smithjw » Thu Aug 30, 2012 11:45 am
So I'm having a wee bit of trouble at the moment. I'm trying to mount some shares from a Mac Mini on my home network but no matter what I try I cant seem to get it working. I've gone ahead and installed AFPFS
Code: Select all
sudo apt-get install afpfs-ng

This installs fine and seems to work until I want to mount a share. I've already set up some folders to mount the shares to:
Code: Select all
/Volumes/Movies/
/Volumes/TV/

When I run the command
Code: Select all
mount_afp afp://Username:Password@IPAddress/ShareName /MountLocation

I get this:
Code: Select all
The afpfs daemon does not appear to be running for uid 0, let me start it for you
Mounting 10.0.1.42 from Steve on /Volumes/Steve
Mounting of volume Steve of server Steve succeeded.

Which seems ok until I try to access the folder when I get a
Code: Select all
-bash: cd: /Volumes/Steve/: Permission denied
More errors if I try
Code: Select all
sudo cd /Volumes/Steve/
sudo: cd: command not found

Hopefully someone out there will be able to help. I know that there are other Distros that have native support for AFP but I've put a fair amount of time into my Rasbian image to start over with something new. Cheers
Posts: 2
Joined: Thu Aug 23, 2012 6:31 am
by snelson48 » Fri Sep 07, 2012 9:13 pm
CODE: SELECT ALL
-bash: cd: /Volumes/Steve/: Permission denied
More errors if I try
CODE: SELECT ALL
sudo cd /Volumes/Steve/
sudo: cd: command not found

Hopefully someone out there will be able to help. I know that there are other Distros that have native support for AFP but I've put a fair amount of time into my Rasbian image to start over with something new. Cheers
-----------
Sounds like you have not set file permissions correctly. Make sure you have rw permsiion on the /Volumes and Steve directory. I live dangerously, so I would 'sudo chmod 777 /Volumes' and 'sudo chmod 777 /Volumes/Steve'. Then use /Volumes/Steve as your mount point.

I am doing much the same as you, mounting AFP shares from my Mac as server. I am sometimes unable to unmount a share and thus remained connected to my Mac until I reboot the rpi and restart the Mac. This is repeatable under the following condition. Play a video file from the server using either omxplayer or mplayer. After the video finishes, afp_client unmount /mountpoint returns no response from server, as well as afp_client status returns no response from server. The server is still active and I can continue to access files, but am unable to disconnect/unmount. This happens with video only if the video completes. If I stop the video before it completes the server connection is normal and I can do a status or unmount successfully. Weird.

Anyone else noticed this abnormal behavior?
Posts: 1
Joined: Thu Aug 30, 2012 9:13 pm
by PhillyNJ » Sat Dec 29, 2012 8:54 pm
I was having the same issue. After you mount the shared folder type:

Code: Select all
sudo su


then type:

Code: Select all
mount


This will display all your mounted disks. It will also give you the path to the mount e.g.

Code: Select all
/home/pi/mountname


Type:

Code: Select all
cd /home/pi/mountname


I am new to linux and having a ball with all the permissions :twisted:
Posts: 102
Joined: Sat Dec 29, 2012 4:07 am
by PhillyNJ » Sat Dec 29, 2012 9:49 pm
Forgot to mention, if you use "sudo su" and it prompts you for the root password and fails, type:

Code: Select all
sudo gconftool-2  --type bool  --set  /apps/gksu/sudo-mode  true


I found this (can't remember where), but there seems to be a bug where the su password will always fails. This usually fixes it.
Posts: 102
Joined: Sat Dec 29, 2012 4:07 am
by PhillyNJ » Sun Dec 30, 2012 2:50 pm
Thought this would be a good tutorial for the wiki. Comments, suggestions welcome http://elinux.org/Mounting_AFP_Shares_To_a_Mac_Over_Local_Network
Posts: 102
Joined: Sat Dec 29, 2012 4:07 am