File Locks and SMB shares with ML

I've been doing a lot of research on SMB and the way it locks files during access. I've made a lot of ground work in my research but could use a little further assistance from this support community.


The symptom is simple to explain: Users are occasionally being prompt for a username and password when attempting to rename or move files and folders.


After doing some research on this topic, I have discovered that there is a direct relationship to files being open on the server at the time the user is attempting to rename or move the folder. The following thread, albiet old, appears to have nailed the problem on the head http://arstechnica.com/civis/viewtopic.php?p=24558131. In particular, there appears to be file locking happening when preview is turned on through the finder. I've had all users remove preview from their Macs and this appears to have helped reduce the occurances of the password prompt, but has not completly solved the problem. This is also a work around, not a fix.


I've been using a series of command to help me trace the problem including openfile.exe on the Windows 2012 Storage Server (sharing the files via smb only) to discover who has what files open on the server, and the lsof command on the client workstations to discover what process has the file open. So far, the finder is consistently the only thing with the file open... even with the finder preview turned off. I've also found that the "open file" is simply the fact that the offending users Mac has a finder window with just the folder open (none of the files within the folder or previews open).


Is the real solution to simply close all finder windows when you're done working in a folder, or is there more that anyone can think of to help me find out exactly what is holding the file lock? Is this a known bug in the SMB implementation of ML? Can we expect to see a fix with Mavericks which will now be using SMB2.0?


Any help or information anyone can provide would be greatly appreciated. I have a bunch of documentation on this issue and would be happy to share. Please let me know if anyone needs any additional details.

Mac Pro, OS X Mountain Lion (10.8.2)

Posted on Aug 15, 2013 1:08 PM

Reply
29 replies

Mar 9, 2015 3:59 PM in response to Finicle

Just wanted to chime in that my organization is having this issue as well. The only "answers" I could find was that Adobe doesn't fully support saving their files to a network location, and Shawn Lamb(poster in this thread) had disabled preview in OSX and that mitigated some of the issue. Has there been any further progress made here that anyone knows about?

Apr 24, 2015 1:26 PM in response to Finicle

I am also having this problem. We have two users on 10.9 and 10.10 using file share on Windows Server 2008R2.


If the first user creates a folder, then a subfolder and puts a file in the subfolder, the second user cannot rename or delete the root file, even if the finder window is closed.

If the first user than disconnects from the drive share, then the second user is able to modify the folder.


This works both ways. I have tried disabling preview and also the creation of .DS_Store files.


In addition, I cannot modify the folder from the Windows Server itself. I have to restart the server service.

Apr 27, 2015 1:03 PM in response to Finicle

Has anyone figured this out yet?? I cant believe this issue isnt resolved yet. Having the same problem here. Tried disabling icon preview under view options but no change. One thing I dont understand is that why does finder remember where i was in a folder after i close finder. E.g. if i scroll half way down in a folder and then close finder and then reopen, it will remember where i was. Because of this when i expand certain folders to see their content (list view) and then close finder and reopen, finder will remember which folders i had expanded. Is there an option to prevent this from happening. It would be ideal if when i close finder all "memory" is purged of which folders were expanded and which position in the folder i was at. Any ideas?????

May 1, 2015 11:43 AM in response to Finicle

Our company is going through the same problems. IT has disabled our image preview (even with the space bar), making it impossible to know which images is which without opening it. We also cannot write a PDF to a folder a second time. We have to delete the first PDF and the write the PDF. We are getting tons pf files opening as "read only". IT is working on it, but its been a long frustrating road. It seems those of us on 10.10.3 are having the most issues.

May 27, 2015 7:23 AM in response to Finicle

Just posting to report a 'same here' message. This issue is really frustrating our user population. Most of them running 10.10.3. I've also been messing with the icons preview and other preview options of finder but I'm still having this issue. Also this seems to be some sort of race condition between the copy and finder locking the file. lsof only shows that finder locks very briefly but enough to make the copy rollback.

The most annoying part of this thing is sometimes the copy works or the copy works for 9 of the 10 files that are copied.

Jul 8, 2015 12:03 AM in response to KellySu

I have this problem as well..


But we are running a Linux (ubuntu 14.04) server with samba 4.2

Disabling the Icon preview column allows me to duplicate files.


I have not yet done enough research but this may be related to my other problem in which an Excel document can't be saved on the network location if it is open for a while (with changes) on a client. Sometimes the whole document is destroyed (0 KB on server) during the save procedure.


To bad that after 2 years no final solution is available

Aug 5, 2015 2:11 AM in response to Finicle

Hello


This is what seem to have fixed this problem for us. Our setup: All Macs on 10.10.3, shares hosted on 2 Windows Server 2012 in fail over cluster and presented trough DFS, Access Based Enumeration enabled. After some tests I managed to isolate this to a process called QuicLookUIHelper. This file is located under /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.fr amework/Versions/A/Resouces. Test method: Connect to your share and copy some images, pdfs and anything that can generate a preview. On one window click on an image so the preview is displayed on a preview pane. Open a second finder window and try to rename the folder that image sits in. Prompt for password right? Also if you look on your Windows server you'll notice that the image is open under Open Files. This problem doesn't exist however on Mac OS 10.8. The version of QuicLookUIHelper on 10.8 is 4 and from 10.9 it's 5. I replaced this file on 10.10.3 and the problem dissapeared. I rolled version 4 of this app to a test group and so far we haven't had a single call about locked folders! Still early days but it looks promising. Version 4 of this app also seems to have fixed slow finder refresh which is now instant. If anyone wants to try it, just copy QuicLookUIHelper from Mac Os 10.8 to 10.9 or 10.10. If you don't have 10.8 handy, I'm sharing mine here https://www.dropbox.com/l/NvJeCwafI7VEMwJBiCthhr


Hope it helps!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

File Locks and SMB shares with ML

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.