Hi, I've got a Word document on a Samba share that I can't rename, overwrite or open. Attempting to rename it gives: Cannot rename Filename: There has been a sharing violation. Attempting to open it gives: Filename.doc is locked for editing by 'another user'. This is on a NAS box so I can't say which Samba version it is. There are no temporary files in the share to show who might have this file open. If I create a file in this share as the same owner, it gets the same ACL but I can edit it. Does anyone have any advice for how I might troubleshoot this? If it *is* opened by another user how can you determine who it is? If not, how can the problem be fixed. (I appreciate that this is probably a Windows SMB rather than Samba problem but with Windows I can see who has what open in Server Manager). Thanks in advance for any help Leon... ----------------------------------------- Email sent from www.ntlworld.com Virus-checked using McAfee(R) Software Visit www.ntlworld.com/security for more information
When this happens with our NAS I log into it and grep the output of the smbstatus command looking for the filename. That gives the PID of the process with the file lock. Then I grep the output of smbstatus looking for the PID and that tells you which user has the file open. -----Original Message----- From: samba-bounces+mikes=hartwellcorp.com@lists.samba.org [mailto:samba-bounces+mikes=hartwellcorp.com@lists.samba.org] On Behalf Of Leon Stringer Sent: Tuesday, September 19, 2006 8:27 AM To: samba@lists.samba.org Subject: [Samba] File Locked Hi, I've got a Word document on a Samba share that I can't rename, overwrite or open. Attempting to rename it gives: Cannot rename Filename: There has been a sharing violation. Attempting to open it gives: Filename.doc is locked for editing by 'another user'. This is on a NAS box so I can't say which Samba version it is. There are no temporary files in the share to show who might have this file open. If I create a file in this share as the same owner, it gets the same ACL but I can edit it. Does anyone have any advice for how I might troubleshoot this? If it *is* opened by another user how can you determine who it is? If not, how can the problem be fixed. (I appreciate that this is probably a Windows SMB rather than Samba problem but with Windows I can see who has what open in Server Manager). Thanks in advance for any help Leon... ----------------------------------------- Email sent from www.ntlworld.com Virus-checked using McAfee(R) Software Visit www.ntlworld.com/security for more information -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
> From: "Michael St. Laurent" <mikes@hartwellcorp.com> > Date: 2006/09/19 Tue PM 03:36:18 GMT > To: "'Leon Stringer'" <leon.stringer@ntlworld.com>, samba@lists.samba.org > Subject: RE: [Samba] File Locked > > When this happens with our NAS I log into it and grep the output of the > smbstatus command looking for the filename. That gives the PID of the > process with the file lock. Then I grep the output of smbstatus looking for > the PID and that tells you which user has the file open.That's done the trick, I've found the culprit! Thanks, Leon... ----------------------------------------- Email sent from www.ntlworld.com Virus-checked using McAfee(R) Software Visit www.ntlworld.com/security for more information
On Tue, Sep 19, 2006 at 03:26:54PM +0000, Leon Stringer wrote:> Hi, > > I've got a Word document on a Samba share that I can't rename, overwrite or open. Attempting to rename it gives: Cannot rename Filename: There has been a sharing violation. > > Attempting to open it gives: Filename.doc is locked for editing by 'another user'. > > This is on a NAS box so I can't say which Samba version it is.Your vendor must have given you source code, so it should be easy to see what version of Samba it is. Jeremy.