[vox-tech] CIFS sharing question

Jan W jcwynholds at yahoo.com
Thu Jan 22 11:19:24 PST 2009


Hi Bill:

Sorry to hear that you're having trouble.  The permissions and user config is one of the toughest things to get _right_.  Some thoughts:

The umask is set per share (as well as globally for samba).  I would try setting values for the "create mask=" directive in the share definition.

I would actually create two shares, one for guest readonly (guest only=yes, read only), and one for authenticated read/write (valid users=,create mask= etc.)  The fact that it points to the same directory shouldn't matter (at least I have done that a few times, and I'm not sure if it's recommended but it worked).  The sticky part is making sure that all permissions are set correctly when you create files on the authenticated share that could be read by the guest share.  Permissions and the mapping of uids get's weird.  I remember having to mess with the global security setting (share vs user), but this might be for earlier versions of Samba. 

About the not mounting if you're in a foreign place, I would set the fstab _not_ to mount at boot, then test using 'smbclient -L' someplace in startup (somewhere like /etc/rc.d/rc.local) to query for the existence of your share.  If script finds server and share, then it could easily do a mount at that point in the boot sequence.  I know that sort of futzing with the rc.local is a hack job, but it's useful for very peculiar configs like that (being root, network, services started, etc).

I hope it's not in bad taste, but I would like to make a big shout out to NFS, since permissions (and many other issues) are easier to grok for those who sprechen zie UNIX.  And the same probing at startup could be done using showmount.  [Sidenote: when I used AS2k3 recently, NFS client/server was a supported add-on from microsoft (included on the install media!).  It worked well and was much faster for what I was doing at the time.]

Hope these points help.  It friggin rocks when it works smoothly, but Samba can be a beast at times :-/

--cheers

jan

PS THX for the 10 year meeting.  Great meeting, great speaker, and very glad I made the drive.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
"The most potent weapon in the hands of the oppressor is the 
mind of the oppressed."
-- Steven Biko
("White Racism and Black Consciousness", in I Write What I Like)
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>


      


More information about the vox-tech mailing list