piamateur
Posts: 2
Joined: Sat Nov 21, 2015 3:53 pm

Mounted Airport Drive not accessible by user pi (afp)

Sat Nov 21, 2015 3:57 pm

I'm trying to mount an apple airport HD on a Raspberry Pi2 using raspbian

I managed to mount the drive using this afp command (doesn't work as user pi):

sudo mount_afp afp://user:password@192.168.1.71/Data /mnt/data

That worked, however, now I can only see what's at /mnt/data when logged as root...

as 'pi', the command 'ls -la' gives me this:
d????????? ? ? ? ? ? data

'sudo ls -la' gives me this:
drwxrwxrwx 24 root root 772 Nov 13 19:08 data

I tried to change permissions on the mount point (/mnt/data) using chmod and chown (as root):
chown pi:pi /mnt/data/
chmod a+rwx /mnt/data

and I get this:
changed ownership of `/mnt/data/' from root:root to pi:pi

but it doesn't work. if I do 'ls -la' as user pi I again get:
d????????? ? ? ? ? ? data

I can live without mounting the drive as user pi but why am I not allowed to do it?

More importantly how can I change the permissions on the mount point?

Any ideas? Thanks

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Mounted Airport Drive not accessible by user pi (afp)

Sun Nov 22, 2015 11:47 am

Try to change permissions on the mount point parent directory (/mnt) using chmod and chown (as root):

Code: Select all

chown pi:pi /mnt
chmod a+rwx /mnt
However, I don't know how that drive works - I suggest you try Google ;)

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Mounted Airport Drive not accessible by user pi (afp)

Sun Nov 22, 2015 1:17 pm

Navyscourge wrote:Try to change permissions on the mount point parent directory (/mnt) using chmod and chown (as root):

Code: Select all

chown pi:pi /mnt
chmod a+rwx /mnt
However, I don't know how that drive works - I suggest you try Google ;)
That doesn't work. The ownership is done on the mount command and with non-Linux filesystem chmod doesn't work.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

piamateur
Posts: 2
Joined: Sat Nov 21, 2015 3:53 pm

Re: Mounted Airport Drive not accessible by user pi (afp)

Sat Dec 05, 2015 8:41 pm

I managed to do it by:
1) Changing permissions on the mount point
2) Creating a folder and chown + chmod it
4) Adding the user to the fuse group
5) Mounting the drive using:

Code: Select all

 mount_afp afp://[username]:[password]@xxx.xxx.xxx.xxx/Data /mnt/data
However, it gets disconnected regularly and then it's not possible to remount it, I have to reboot...
I think it's when another user on the network connects to the drive but not sure yet.
I've read lots of post online about the subject and it seems pretty hard to get it right. The apple airport HD is just not ideal to use as a NAS apparently. I'm still looking for a solution to mount it automatically at bootup and if it gets unmounted for some reason to remount it automatically.

DougieLawson wrote:
Navyscourge wrote:Try to change permissions on the mount point parent directory (/mnt) using chmod and chown (as root):

Code: Select all

chown pi:pi /mnt
chmod a+rwx /mnt
However, I don't know how that drive works - I suggest you try Google ;)
That doesn't work. The ownership is done on the mount command and with non-Linux filesystem chmod doesn't work.

Hi-Jack
Posts: 2
Joined: Thu Jun 07, 2018 11:50 am

Re: Mounted Airport Drive not accessible by user pi (afp)

Fri Jun 08, 2018 6:30 pm

Update notes, seeing that this came up on Google. I suffered the same series of frustrations mounting my Airport Time Capsule. I am running Raspberry Pi 3B+ on Rasbian Stretch released 14 March 2018(and with recent updates) with standard GUI over wi-fi.

Here is my fstab file code line:

Code: Select all

//100.10.10.1/Data /mnt/timecapsule cifs username=******,password=******,vers=1.0,rw,uid=1000,iocharset=utf8,sec=ntlm 0 0
where:
100.10.10.1 is the LAN IP adress reported by the Airport Utility
Data is the Diskname reported by the Airport Utility
/mnt/timecapsule is the directory to which I am mounting

A few changes appear to have happened in the kernel since the original post:
  • You need to add "vers=1.0" statement
  • "user=" and "pass=" should now be "username=" and "password=" respectively
  • Stretch and Jessie behave differently, what works on Jessie will not neccecarily work on Stretch, hence the required vers=1.0 statement added
  • Lastly, regarding the the drive not mounting at boot time, there is now a "Wait for network" box that that can be ticked in the Raspberry Pi Configuration Utility, that solved my mount at boot problem.
Good luck.

Return to “Troubleshooting”