My organisation uses Debian Linux running Samba for office file servers. Users run Outlook for their email, which crashes fairly regularly and leaves the outlook.pst file locked.
Currently, our procedure for removing the lock (which allows the user to use Outlook again) is:
- Manually open a terminal session
- Go to the users dir holding the outlook.pst file
- Remove the ~outlook.pst.tmp file (or similar name)
- Rename the pst file (eg mv outlook.pst outlook.pstoff)
- Copy the file back to outlook.pst (ie cp outlook.pstoff outlook.pst)
- Remove the old file (ie rm outlook.pstoff)
- chown outlook.pst to the user
This could be scripted reasonably easier, but to be done properly it would need checking for available disk space before doing the copy. Is there some easier way to remove the lock on the file without copying it?