Joseph Behrens - 2013-05-15

When sharing a read-only mounted volume over AFP from OSX, we are running into a permission issue. Even though we are root, we are getting the message "Permission denied" when attempting to read files. This also happens when we have the source volume mounted read-write on the Mac, and hand the read-only option to mount_afp. We have tried sharing the volume from OSX10.6 and OSX10.8 with the same results.

When everything is in RW, we are able to read the files, but this mode will not be available to us outside of testing.

The system we are using afpfs-ng on is running CentOS release 6.2 (Final)
The afpfs-ng version is:
afpfs-ng-0.8.1-9.el6.3.x86_64
fuse-afp-0.8.1-9.el6.3.x86_64

As a quick example:

[root@archive52 network]# ls
joe-eth:JPL:AFP  tetris:Shared:Win
[root@archive52 network]# ls -al
total 16
drwxrwxrwx  4 root root 4096 May 15 16:00 .
drwxr-xr-x. 4 root root 4096 May 15 16:00 ..
drwxrwxrwx  2 root root 4096 May 15 16:00 joe-eth:JPL:AFP
drwxrwxrwx  2 root root 4096 May 14 13:25 tetris:Shared:Win
[root@archive52 network]# mount_afp -o ro 'afp://user:password@joe-eth/JPL' /mnt/network/joe-eth\:JPL\:AFP/ 
Mounting joe-eth from JPL on /mnt/network/joe-eth:JPL:AFP/
Mounting of volume JPL of server joe-eth succeeded.
[root@archive52 network]# ls -al
total 12
drwxrwxrwx   4 root root 4096 May 15 16:00 .
drwxr-xr-x.  4 root root 4096 May 15 16:00 ..
drwxr-xr-x  13 root root  398 May 15 09:01 joe-eth:JPL:AFP
drwxrwxrwx   2 root root 4096 May 14 13:25 tetris:Shared:Win
[root@archive52 network]# cd joe-eth\:JPL\:AFP/
[root@archive52 joe-eth:JPL:AFP]# ls -al
total 10
drwxr-xr-x 13 root root   398 May 15 09:01 .
drwxrwxrwx  4 root root  4096 May 15 16:00 ..
drwxr-xr-x 49 root root  1622 May 14 09:49 2006 - Collected
-rw-r--r--  1 root root     0 May 15 08:38 .com.apple.timemachine.donotpresent
-rw-r--r--  1 root root  6148 May 15 09:00 .DS_Store
drwx------  7 root root   194 May 15 09:10 .fseventsd
drwxr-xr-x 12 root root   364 Apr  8 10:09 MARKETING
-rwxr-xr-x  1 root root   859 May 14 07:57 New Text Document.txt
drwxr-xr-x 10 root root   296 Apr  8 18:03 Solutions Partner Logos
drwx------  5 root root   126 May 15 08:38 .Spotlight-V100
drwxr-xr-x 11 root root   330 Apr  8 18:05 Technology Partner Logos
-rwxr-xr-x  1 root root 44888 Apr 10 11:13 ToolsOnAir.png
d-wx-wx-wt  2 root root    24 May 15 08:38 .Trashes
[root@archive52 joe-eth:JPL:AFP]# cat New\ Text\ Document.txt 
cat: New Text Document.txt: Permission denied
[root@archive52 joe-eth:JPL:AFP]#