Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

mount_smbfs read permission problem

I'm having trouble getting read access to a successfully mounted samba mount on a mac running Tiger 10.4.10. I'm connecting to a WIndows XP Pro share called 'Data'. I'm using mount_smbfs to do the mount as user 'smb_user' on the mac in an /Users/smb_user dir called 'mount_dir', like so:

mount_smbfs -U smb_user //WINBOX5@<ip addr>/Data /Users/smb user/mountdir

Now.... smb_user can read the contents of mount_dir just fine. However, no other user on the mac except root/sudo can see inside mount_dir (permission denied). In many cases this might make sense for privacy reasons but in my case I would like other users on the mac (in particular, the apache/www user running php scripts) to have read-permission of mount_dir. I've played around with the permissions-related switches available to mount_smbfs but nothing has worked. e.g.

mount_smbfs -U smb_user -f 0755 -d 0755 //WINBOX5@<ip addr>/Data /Users/smb user/mountdir

This gives mount_dir wide open read permissions but other users on the mac still can't read mount_dir. I'm guessing this is because the permissions on the xp box has a lot to do with who can read what on the mount/share... so i've played around with this too...
I made identically named user accounts on the mac and the xp machines, 'smb_user'. On the xp machine I give the share and the folder that's shared read permission for 'Everyone' on the xp machine and thought this would suffice. In addition, I made a 'test' user account on both the mac and the xp machines and gave 'test' on the xp machine read-permission to the 'Data' share and the folder it shares, but still get permission denied on the mac when a user other than smb_user or root tries to read mount_dir in smb_user's home.

Any ideas??

PowerMac G5, MacBook Pro, Mac OS X (10.4.10)

Posted on Sep 4, 2007 2:14 PM

Reply
5 replies

Sep 5, 2007 10:24 AM in response to BDAqua

I checked out SharePoints. I might be misunderstanding something with this app but I'm not sure how I can use SharePoints to make Windows shares mounted on a mac readable by all users on the Mac. ..especially since "the file permissions are only changed for the top level share directory."
Can you be more specific about how to apply SharePoints to my problem? Thanks.

Sep 6, 2007 12:07 PM in response to bleakbeak

OK, I figured it out... here's the solution for my case....
There was really only one other user that needed read-access to the mount.. www. I'm running apache on the mac and have php scripts that need read-access to the data in the mount. Using 'sudo -u' I am able to mount the share in /tmp/my_mnt (where my_mnt is chown'ed and chgrp'ed to 'www') as www so that the web scripts, which are also owned by www, have read access to the contents of /tmp/my_mnt. Here is the command I used:

sudo -u www mount_smbfs -U sambauser //<ip addr>/ShareName /tmp/my_mnt

-U sambauser is still necessary, in my experience at least, because you need to have matching user accounts on the mac and the PC.. in this case I have a 'sambauser' account on the PC and the mac, with the same password. I ran the above command logged in as user 'beak', who is a registered sudo'er - sambauser is not a sudo'er. (This might not be the optimal configuration, but hey, it works). Incidentally, both sambauser and beak have ~/.nsmbrc files with something like this in them so that mount_smbfs can be run without prompt for password:

---

\[default\]
minauth=none

\[<ip addr>:SAMBAUSER\]
username=SAMBAUSER
password=xxxxxxx
workgroup=<workgroup>

---


This read-access (or lack there of) thing was a problem in the first place, i come to find out, because it seems Apple decided that Tiger should not allow read-access between different user mounts, even if the user sets permissions to allow world-read access. We tried the same mount from a linux box (to the same PC) and read-access by other users was not a problem... which confirmed this. Also, this person ( http://seriss.com/people/erco/osx/) talks about having the same problem and reporting it as a bug to apple. Apple responded only with, "works as intended" -- implying this for some reason was a "feature" apple has built into the apple file system??!!
Why apple would do this is a mystery -- what a NIGHTMARE!

mount_smbfs read permission problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.