[K12OSN] Samba Question

"Terrell Prudé, Jr." microman at cmosnetworks.com
Mon Jul 12 23:33:19 UTC 2004


If I understand you correctly, there is indeed a way to do this.  I do 
something kinda similar with a "public" share for a friend of mine, whom 
I have using K12LTSP in his business.  In this Samba share (using Samba 
3.0.x, BTW), all users have rwx permission on the share, but "world" has 
nada.  So, I set the entire directory to be 770, uid root, gid users.  
All my users are in the group "users".

Now, to tweak Samba.  In your smb.conf file, you do this under the share:

[public]
   comment = Public Share
   path = /home/public
   browseable = yes
   writable = yes
   force create mode = 0660
   force directory mode = 0770
   public = no


All lines except for "comment" are needed, in "real world" terms, but 
the two magic lines are "force create mode" and "force directory mode".  
OK, maybe the "public = no" setting isn't strictly needed, but it's a 
really good idea.  What the two magic lines do is, every time a file is 
created, Samba forces the permissions to be 660.  Same for directories 
with permission 770 that someone might create.

Hope this helps,

--TP

Brian Benson wrote:

>Sorry in advance if this isnt much
>help... Can users delete files that
>other users create? If not it sounds
>like a umask or a group file ownership
>problem. what does `ls -l` look like
>after creating a file with a user? I
>would check the unix group then use
>samba to "map" that unix group to a
>windows group with the samba `net`
>command. (I have only used samba group
>mapping in a samba domain environment)
>
>Good luck.
>
>  
>
>>I know, this isn't a samba list --
>>    
>>
>but you folks are "in the trenches"
>  
>
>>with me...  Feel free to reply
>>    
>>
>off-list so as not to pollute the email
>  
>
>>boxes of all those folks that don't
>>    
>>
>care about samba...
>  
>
>>I have a windows app that uses a
>>    
>>
>fox-pro database.  I need to have a
>  
>
>>group of users be able to
>>    
>>
>read/write/change/delete the files on
>a samba
>  
>
>> share.  For some reason, no matter
>>    
>>
>how I set up the samba share, I
>  
>
>>seem  to get "access denied" while
>>    
>>
>performing certain actions.
>  
>
>>(Especially  reindexing, upgrading
>>    
>>
>tables, and writing over top of
>  
>
>>existing files)
>>
>>Could someone point me to a "how to
>>    
>>
>get foxpro programs to like samba"
>  
>
>>type tutorial, or a sample smb.conf
>>    
>>
>file that will help me?  Right now,
>  
>
>> I had to copy the database folder
>>    
>>
>to a workstation, and use windows
>  
>
>>filesharing to share the data to
>>    
>>
>everyone else.  TERRIBLE solution, but
>  
>
>> it works for now.  I refuse to
>>    
>>
>believe that windows filesharing can do
>  
>
>> what samba can not. :)
>>
>>There are many file-locking options,
>>    
>>
>like "op-locks" "fake op-locks"
>  
>
>>etc, that I just don't understand.
>>    
>>
>I know on the linux side, the files
>  
>
>> are created properly, and the users
>>    
>>
>*should* have permission to
>  
>
>>change/delete/etc -- but somehow my
>>    
>>
>smb.conf file doesn't let it work.
>  
>
>>I'd paste the appropriate part of my
>>    
>>
>smb.conf file here -- but it's
>  
>
>>changed so many times, that I'd
>>    
>>
>almost rather a fresh outlook on how to
>  
>
>> set up the share.  None of the
>>    
>>
>file-locking options I've tried work.
>  
>
>>:)
>>
>>Thanks a bunch, and sorry again for
>>    
>>
>posting a non LTSP question...
>  
>
>>-Shawn
>>
>>
>>
>>--
>>Shawn Powers
>>Technology Director
>>Inland Lakes Schools
>>PHN: 231-238-6868 x9174
>>FAX: 509-356-7024
>>spowers at inlandlakes.org
>>http://techcorner.inlandlakes.org
>>
>>--<Disclaimer, now required for
>>    
>>
>frustrating reasons>--
>  
>
>>The views, opinions, visions,
>>    
>>
>thoughts, comments,
>  
>
>>sarcastic whims, forecasts, poetic
>>    
>>
>outbursts,
>  
>
>>cynical wit, future plans,
>>    
>>
>implementation ideas,
>  
>
>>OS preference, curricular insight,
>>    
>>
>ice cream preference,
>  
>
>>or anything else I might infer are
>>    
>>
>not the
>  
>
>>views of Inland Lakes Schools.
>>    
>>
>Pretty much everything
>  
>
>>I say, do, think, or imply with
>>    
>>
>punctuation should be
>  
>
>>considered my own delusions, and
>>    
>>
>ignored completely.
>  
>
>>
>>    
>>
>_______________________________________________
>  
>
>>K12OSN mailing list
>>K12OSN at redhat.com
>>
>>    
>>
>https://www.redhat.com/mailman/listinfo/k12osn
>  
>
>>For more info see <http://www.k12os.org>
>>    
>>
>
>
>
>
>_______________________________________________
>K12OSN mailing list
>K12OSN at redhat.com
>https://www.redhat.com/mailman/listinfo/k12osn
>For more info see <http://www.k12os.org>
>
>  
>


-- 
_____________________
Do you GNU!? <http://www.gnu.org>
Tired of spam? With Mozilla Thunderbird 
<http://www.mozilla.org/thunderbird>, you have the best spam protection 
around--who needs Yahoo? :-)





More information about the K12OSN mailing list