Locks & permissions on shares

Rob Naccarato rob.naccarato at sheridanc.on.ca
Thu Aug 6 20:54:02 GMT 1998

We have a requirement here to set up what we call a
"shared area".  This is nothing more than a directory
on a Unix server (Digital Unix) that allows a group
of users read and write access to the directory.
The shared area needs to be accessible from Win95 clients.

A big restriction that we want is:

- when a user opens a file, others should not be able to
write to that file.

So, the question is: how do you do this?

I've set up a shared area this way:

- directory is /usr/shared, owned by root.dudes
- permissions on /usr/shared are 0770
- all users needing r/w access are in the group 'dudes'

In smb.conf, I've got:

    comment = Shared Area 1
    default case = lower
    mangle case = yes
    preserve case = no
    short preserve case = yes
    browseable = yes
    path = /usr/shared
    guest ok = no
    read only = no
    valid users = rob, bob
    force create mode = 0770

Some interesting behaviour has occured.  When user 'rob'
opens a file and writes to it, a lock is placed on it
(share mode lock).  If user 'bob' then opens the
file, rob's lock disappears and bob now has the
lock. Bob is now free to write to the file.

Any ideas?  


Rob Naccarato           "In a perfect world, everyone would use
Sys Admin               Linux and drive a Saturn"
Sheridan College
Oakville, Ont. Canada

More information about the samba mailing list