multiple clients updating same file in ftp
Larry Bates
larry.bates at websafe.com
Tue Jan 10 17:00:53 EST 2006
Preface the update with a rename. If the rename fails,
someone else is updating the file, if it succeeds update
the file and rename back when finished.
Suggestion: ftp is not the best way to handle such a task.
Use a database, XMLRPC or sockets is probably a better
way.
-Larry Bates
muttu2244 at yahoo.com wrote:
> hi all
>
> am updating the same file in ftp, through multiple clients, but am
> scared that two clients may open the same file at a time, and try
> updating, then the data updated by one data will be lost.
> So i have to provide some lock mechanism to that file in ftp, so how
> can i lock it, if one client opens it for updating, so that till it
> gets relased it cannot be updated by other clients.
> Could u please suggest me the simple solutions through the python code.
>
> thanks for the help
> Yogi
>
More information about the Python-list
mailing list