ftp: how to prevent access to file currently being accessed?

Jan Schenkel janschenkel at yahoo.com
Thu Nov 21 13:43:01 EST 2002

--- Oliver Hardt <hardt at u.arizona.edu> wrote:
> hello:  i really have not much knowledge about how
> ftp works, so 
> forgive the question in case it was just too
> obvious.
> 	problem:  a file is kept on a ftp-server.  this
> file is being 
> accessed by n clients, and all clients will modify
> the file and 
> upload it to the server.
> 	question: how can i monitor from the client side
> whether the 
> file is currently being used by another client, so
> that the it is not 
> accessed until the  currently accessing client
> finished uploading?
> 	thank you!  best, oliver hardt.

Hi Oliver,

If you control _all_ client access, you could create a
file in the same directory on the server ; give it the
same name as the file, but append a simple token like
'.lock' ; then you can check for the presence of that
file before allowing the user to edit it from your
Of course this won't do anything if users access it
from another application. Hope this helped

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.

More information about the Use-livecode mailing list