Saturday, April 7, 2012


Sometimes, when we try to edit a document uploaded on SharePoint, we get a file locked error: “File is locked for editing by ‘domain\username’ “, even though the file has been checked in and no one else is editing the file.
 

Usually a file is locked by WSS when a particular user has ‘checked out’ the file for editing purposes. A write lock is created so that no other user can edit this file simultaneously (except in case of versioning).

When the user checks in the file, the write lock is removed and the file is now available for editing by others.  But sometimes, even if the file has been checked in, it still gives a file lock error. There can be numerous reasons for this such as:

         1.    System crashes while the file is still open.

         2.    File has been closed unexpectedly.

         3.    Check in was not successful.

         4.    Network connection is lost while file is still open.

In most of the cases, the write lock still exist for the file so its gives an editing error.

Below are the few workarounds to resolve this error:

          1.    Check whether the file has been properly checked in or not. If not, refresh the page and try to check in the file again.

          2.    Delete the local copy of the file present in the cache folder of the concerned user account (access to user’s PC required).

          3.     Close all the instances of file type opened in the system. E.g. if the file type is excel, then close all the excel files currently opened.

          4.    Also kill the file type service (excel in this case) using the task manager.


Wait for 10-15 minutes and then try to edit the file. The write lock times out after 10 minutes. Users cannot modify the document during the time when the document is locked. 

Once the write locked times out, the file will be available for editing. If the concerned user is not available or the PC is not accessible, then please refer to this article.