TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:2955] samba write locks



I'm not positive, but I think Samba takes care of this automagically on a
file-level basis in the same way a Windows OS would do it, though it's
actually more dependent on the application you're using. I have received
access errors while trying to access a file that was open on another
computer, but you have to keep in mind what sort of application is using the
file. For instance, Windows' Notepad will open a file into it's program
memory, then release it back to the filesystem. As far as the filesystem is
concerned, it has been closed. When you save the file in Notepad, it
*re-opens* the file, writes to it, then closes it again. This means that you
can have a writable copy of a text file open in multiple instances of
Notepad, and you can get the logical equivalent of a race-condition, where
users over-write each other. MS Word, on the otherhand, locks the file for
as long as the user has it open, though you can open another instance if you
agree to do it read-only.

If I read your question literally, it seems you want to write-lock the
*entire* filesystem to all but one connection at a time. I'm not sure that's
what you want, but if it is, I don't know of any way to do this on any
multi-user OS. If someone does know of an OS that will do this, I'd like to
know!

Neal

> -----Original Message-----
> From: Ben Luey [mailto:lueyb@carleton.edu]
> Sent: Tuesday, December 29, 1998 1:08 PM
> To: tclug-list@listserv.real-time.com
> Subject: [TCLUG:2955] samba write locks
>
>
> How would I setup a samba share such that only one writeable
> connection
> can be made at a time. I have a file I'd like to give many
> people write
> access, but I don't want data corruption, or a loss of data changes. I
> just read the smb.conf man page, but max connections and
> locking seems to
> only limit the number of connections, and I'd like have have
> an unlimited
> number on read-only connections.
>
> Thanks,
>
> Ben
>
> Ben Luey
> lueyb@carleton.edu
> ICQ: 19144397
>
> "Are your parents going out for New Year's Eve?"  -- Hobbes
> "Are you kidding?  My parents' idea of a wild night is to mix
> a scoop of real
> coffee in with decaf." -- Calvin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@listserv.real-time.com
> For additional commands, e-mail:
> tclug-list-help@listserv.real-time.com
> Try our website: http://tclug.real-time.com
>
>