So I have read what few questions I can find on a problem with afp and am stuck. I can probably work around this, but am curious enough about why it isn't working that I wanted to poke the community and see if there are any clues.
I am trying to set up a Pi 400 to automount an AFP share from a NAS. I have installed fuse + afpfs-ng, and am running rasbian-buster.
I am not all that familiar with the debian branch of linux (more of a redhat person) so I might have missed some step specific to that family of distros.
Mounting manually works fine. So :
mount_afp afp://remote_username:remote_password@nas_name.private/share_name /home/mount_point
Functions as one would expect. Files can be viewed, added, deleted, etc
To support automounting via fstab I have:
- Created a 'fuse' group (1002)
- Added 'pi' and 'local_username' to 'fuse'
- Commented in 'user_allow_other' in /etc/fuse.conf
- Set the permissions for /home/mount_point using 'chmod og-rwx /home/mount_point'
- Created /sbin/afpfs, which contains 'mount_afp $3 $4 $1 $2' and has permissions '-rwxr-xr-x'
My fstab entry looks like:
afpfs#afp://remote_user:remote_password@nas_name.private/share_name /home/mount_point fuse user=local_username,group=fuse 0 0
But, when I try to put it all together and mount via 'mount', I get:
root@local:/home# mount /home/mount_point Unknown option exec, skipping Unknown option suid, skipping Unknown option dev, skipping Unknown option dev, skipping Unknown option suid, skipping The afpfs daemon does not appear to be running for uid 1001, let me start it for you *** buffer overflow detected ***: mount_afp terminated The afpfs daemon does not appear to be running for uid 1001, let me start it for you *** buffer overflow detected ***: mount_afp terminated Trying to startup afpfsd: No such file or directory
Where user id 1001 is local_username.
The only thread I could find that had this buffer overflow problem was related to not having read/write permission on the server, but this seems to work fine via mount_afp.
Now, if I look at the arguments being passed into /sbin/afpfs I get:
-o rw,group=fuse,user=local_username,exec,suid,dev,dev,suid afp://remote_username:remote_password@nas_name.private/share_name /home/mount_point
I tried playing around with the options, such as stripping out the 'unknown options' and hardwiring the script to use the known good 'mount_afp' command from before and it fails in the same way, with no improvement.
I also tried calling /sbin/afpfs from a shell, and that worked just fine. So I think I can narrow it down to something involving fusefs and the environment it calls afpfs in.
So anyone with more familiarity with how these systems interact have any thoughts?