Clearing CIFS locks
If you have a file hosted on a filer that is held open by another user that you can't delete (ie you try to delete a file as Administrator, but the error tells you that the file is in use by another user):
- Go to Computer Management console (right click "My Computer", select "Manage"; XP users Administrative Tools -> Computer Management) and then connect the console to the filer in question.
- Expand the "Shared Folders" (XP: System Tools -> Shared Folders)
- Select "Open Files"
- Select the opened files that you want to break the locks
- Select "Close open files" from the right-click menu to release the locks
Now you can delete (or overwrite) the file.
Notes from NetApp:
- You must be a member of the Administrators or Power Users group to use Shared Folders
- "Open Files" folder contains the following information about all the open/locked files on the computer:
- Open File:
Lists the names of open files. An open file could be a file, a named pipe, a print job in a print spooler, or a resource of an unrecognized type. In some cases, a print job is shown here as an open named pipe.
- Accessed By
The name of the user who has opened the file or accessed the resource.
The type of network connection: Windows, NetWare, or Macintosh.
- # Locks
Displays the number of locks on the resource.
- Open Mode:
Displays the permission that was granted when the resource was opened.