I want to mount a samba share from a remote nas box on a mountain lion server. The problem is that the files should be accessible by the _www user (apache). I tried to use automount but was unable to specify a umask or something else that allows another user (not the one that mounted the share) to gain access. My last resort was to use mount_smbfs directly like this:
mount_smbfs -o rw,soft -f0777 -d0777 <share> <target_dir>
If I mount this as root, I can see all files and directories and they have 777 permissions.
drwxrwxrwx 1 root wheel 16384 Sep 21 15:13 my_directory
But even so other users still can't access anything. I get a "permission denied" error when listing with ls. There are no acl's enabled.
ls: my_directory: Permission denied
Is there anything in Mountain Lion Server that prevents access to mounted shares other than the users who mounted it? Apple's Samba implementation lacks several options (umask for example) and I wonder how this is barely usable to anybody...