NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
jszatmary
Dec 05, 2008Aspirant
AFP Mount Point Permissions (Solved)
I have the following situation on Leopard 10.5.5:
% mkdir a
% ls -ld a
drwxr-xr-x 2 User staff 68 Dec 4 21:53 a
% mount_afp afp://User:password@readynas/Share
% ls-ld a
drwx------@ 9 User staff 264 Dec 4 21:54 a
% ls -l a/*
drwxr-xr-x@ 4 User staff 264 Dec 4 11:56 a/Stuff
% chmod go+rx a
% ls -ld a
drwx------@ 9 User staff 264 Dec 4 21:54 a
The behavior is identical when mounting through Finder or AppleScript or Automator etc.
So, the permissions on the mount point start out correctly, but after the mount only the user has any access. And, trying to change it afterward (which would be an issue anyway since it would require some hacks during boot/login) does not work. This is a problem because the web server cannot access the share. The files inside the mount have correct permissions.
Is there a way to change the default mount point permissions? From where are these permissions inherited? Are they coming from ReadyNAS or is it a mount behavior? Can either the ReadyNAS share or mount behavior be modified to provide group and world read/execute permissions on the share?
Thanks,
John
% mkdir a
% ls -ld a
drwxr-xr-x 2 User staff 68 Dec 4 21:53 a
% mount_afp afp://User:password@readynas/Share
% ls-ld a
drwx------@ 9 User staff 264 Dec 4 21:54 a
% ls -l a/*
drwxr-xr-x@ 4 User staff 264 Dec 4 11:56 a/Stuff
% chmod go+rx a
% ls -ld a
drwx------@ 9 User staff 264 Dec 4 21:54 a
The behavior is identical when mounting through Finder or AppleScript or Automator etc.
So, the permissions on the mount point start out correctly, but after the mount only the user has any access. And, trying to change it afterward (which would be an issue anyway since it would require some hacks during boot/login) does not work. This is a problem because the web server cannot access the share. The files inside the mount have correct permissions.
Is there a way to change the default mount point permissions? From where are these permissions inherited? Are they coming from ReadyNAS or is it a mount behavior? Can either the ReadyNAS share or mount behavior be modified to provide group and world read/execute permissions on the share?
Thanks,
John
11 Replies
- darkfaderAspirantThe subject has "Solved" in it, but I don't see a real solution.
I didn't exactly fix the 700 permission problem, but I could change the user by hooking mount_afp:
sudo -i
mv /sbin/mount_afp /sbin/mount_afp2
vi /sbin/mount_afp
: #!/bin/sh
: sudo -u darkfader ${0}2 $@
chmod +x /sbin/mount_afp
Result:
ls -l /Volumes/Resources
total 0
drwx------ 191 darkfader staff 6450 Feb 6 01:08 download
That's good enough for me.
Tip: if you have a username+password in the map file, change that file's perm to 600 to protect it.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!