PDA

View Full Version : Can't get proper network share permissions



jeopardyracing
12-05-2004, 03:18 AM
Here is my problem: I can mount the Samba shares on my Mac (as server) on my HD-install Knoppix PC (client) fine, but no matter what I try, I seem to be unable to get dmask=777 and fmask=777 if I am mounting from a user account. Even when I modify FSTAB for the network shares, I only have full permissions to the Mac's shares if I am logged in as root.

I notice something interesting: on my Knoppix PC, my logon ID is 1000, while on the Mac it is 501. Knoppix seems to honor the Mac's permissions - in other words if "others" does not have read or write, neither do I coming over the network from Knoppix. As 1000, I don't get these permissions unless I change the permissions on the Macs directories (on the Mac itself, of course) to allow "Others" permissions. One version of my code for mounting the share (I have tried many!) is:


#!/bin/bash

smbmount //server/share /home/user/mnt/mac -o dmask=777,fmask=777

Ideas?

jeopardyracing
12-06-2004, 12:14 AM
I upgraded my smbfs via apt-get and still no change.

I tried a million things to get Knoppix to honor dmask=777 and fmask=777 for a user account and it just refuses. Here is the solution I settled on for users facing the same challenge:

I created a new group in /etc/group called "501" which is the username and groupname on the Mac. I then gave the directories I needed access to on the Mac rw for the Group and nothing for Others. This did not compromise Mac security since 1) when you authenticate on the Mac's samba server you are the file owner for permissions purposes anyway and the only permissions restrictions are enforced by the client and 2) because other admin users on the Mac are not members of eachothers groups. Previously I had to give rw to Others on the Mac to let Knoppix see and write, which did give other users on the Mac full rw.

I just thought I'd post back in case anyone faces the same challenge.