Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

file locking with OSX Server & Microsoft Word

We have a small office LAN based on a Airport Extreme bases station. Periodically Microsoft Word reports a break in connection to the shared folder where we store documents to get disconnected. When that happens and the user reconnects to the share, the user gets the file read-only message for the Word document that was open at the time.


I have found that in order to clear the read-only flag, I have to restart the server and open the Word file on the server with the ID of the user who was editing the file on the remote computer. Only that seems to clear the file locking that causes the file to be read-only.


I cannot figure out a less drastic way to release the lock file. I don't see any hidden temp files in the same folder as the document that is locked for editing found by ls -a or in the root direction of the shared folder in the .TemporaryItems/folders.<UID> that seems to be holding the lock.


I have run chflags nouchg <Word file> from Terminal, but that seems to have no effect either. I also used xattr to see if there were any locks held that way, but I don't see anything that way either.


File sharing to Macs only, which are configured just to use AFP through OSX Server.


Does anyone understand how the file locks of Word documents can be released directly with out restarting the server?


I should add that the underlying problems seems to be WiFi related. The behavior is that the WiFi connection seems to break long enough that the shared volumes disconnects. Outlook also causes a break. This behavior seems to have started with 10.9 and the purchase of new Retina Display MacBook Pros. I turned off AppNap on the Office applications but that is not clearly helpful. I also have been told the problem seems more likely to occur when Word is open in the background and another program like Outlook is in the foreground.


Any suggestions appreciated.

Mac mini, OS X Mavericks (10.9.3), OSX Server 3.1.2

Posted on Jun 10, 2014 5:52 AM

Reply
11 replies

Jun 25, 2014 11:11 AM in response to jimsoxz

We are experiencing this exact issue! The difference is that our office is entirely wired ethernet. I also turned of app nap in the MS office apps, but just yesterday so I don't yet know the effect of that tweak. The interruptions are somewhat less common lately, after a lot of client machine and server setup attention. But It still happens to everyone in the office about once a week, interrupts the workflow and upsets staff. And, as you say, they will not be able to access the document they tried to save when the server connection was lost. I believe they have found ways to have another user open the doc and resave or "save as" to the server that allows the original user to reopen the doc. Not sure of the specifics of their coping behavior which SHOULD NOT BE NECESSARY if Mavericks server was better software.


I must say this is really disappointing server software Apple! I have installed and supported Apple server software for over ten years and never had any trouble with reliable file sharing. AND I did not need to be a network specialist, using terminal tweaks, to setup and support a basic file server setup and I should not have to be now. It would take a day but I still am considering going back to Mountain Lion server which was entirely trouble free and met our needs.



Mac mini, OS X Mavericks (10.9.3), OSX Server 3.1.2

Aug 8, 2014 8:20 AM in response to mikelife

This is actually quite an old, ongoing issue with Microsoft Office and Mac OS Server that doesn't seem to be being addressed by either. There are a few other threads you might find helpful:


Mac Excel files change to read-only when accessed by a PC user

(... the above won't solve your problem in my experience - in fact, sorry to say, nothing will yet!)


It does seem that a lot of the issues are down to Office's strange creation of temp files. I have found various threads that go into more detail, but can't find them now. They're out there. None offer a concrete fix - I certainly wouldn't follow the Microsot.com support suggestion of disabling AFP and relying on SMB (in fact, I've had far less issues when using AFP and disabling SMB on current versions, but as I'll get to, that may be about to change).


From memory Apple is dropping both AFP and current SMB implementations on Yosemite and going with SMB 3 for all users/platforms to access shares. Whether or not this'll be an improvement I can't say having not tried it, but I've given up trying to fix it on current versions and am just putting out fires as and when they start with my clients. Microsoft Office is long overdue an update for Mac, so with any luck they'll use a more sensible system with that and the whole issue may be resolved.

Aug 11, 2014 6:46 AM in response to jimsoxz

Apple write an operating system and also produce file sharing software as part of that to be used as a file server. Apple provide documentation for third-party software developers on how they should write software to work with Apple's software and also give those developers early access to new versions so those third-party developers can test and if needed make adjustments and issue updates to cope with any Apple changes.


Some third-party developers are good at dealing with this, some are bad, and some totally ignore what Apple does and give the impression they don't care if their product works properly or not. I think we can all judge where Microsoft sits. 😟


It appears Microsoft have never paid any attention in particular to how Apple expect file-locking to be handled when accessing files on a Mac server. There have been problems for years and years and years with Office. Two other problems I have seen which seem different to yours but probably related are -


  1. With Office documents it is supposed to be possible for more than one person to edit the same file at the same time, consider it a miracle if this actually works
  2. With Office in particular Word, there is an auto-save function, unfortunately the way this seems to be implemented it seems that Word creates a new temporary file each time it auto-saves the document and keeps all the previous temporary files open still, this eventually means potentially over a hundred temporary files are open - just for one Word document and you can then hit a limit on the total number of files you are allowed to have open at the same time. At this point further auto-saves fail, and you also encounter great difficulty doing a real full save of the document. 😠


I do not hold Apple completely blameless over this issue, it is likely their file-locking implementations change too often, and have inadequate documentation, however even considering this a company the size of Microsoft with the amount of sales (and profit) they derive from Office for the Mac has no excuses at all for failing to put the effort in to resolve any such clearly critical problems.


We could go on and on about other areas where Microsoft don't play by the (software) rules. Even in Windows Office does not obey the standard print dialog rules Microsoft specified themselves!


Unfortunately not only is Office for Mac upgraded infrequently, but even when new paid for upgrades are released Microsoft have a history of still not fixing bugs. It goes without saying that a mere free update is even less likely to actually fix a bug, typically such free updates only address security issues. The next version of Office is going to be Office for Mac 2014 see http://www.macworld.com/article/2106643/microsoft-will-release-a-new-version-of- office-for-mac-this-year.html


One area I confidently predict Microsoft not to resolve in Office for Mac 2014 is that fact that Word for Mac still does not support right-to-left languages like Hebrew and Arabic. This is despite the fact that OS X itself has supported this for years and years, and despite the fact other Mac programs support this including the free TextEdit and Pages - both of which can read Word files. Some people may remember that at one point the Israeli Government temporarily banned all Microsoft software over this issue. See http://apple-beta.slashdot.org/story/03/10/15/2215249/israeli-government-suspend s-microsoft-contracts This issue goes back over TEN years!!


I note that Microsoft has now taken their OfficeForMac blog offline, probably due to the weight of criticisms. I would not say it is due to out-right anti-Microsoft hate, that war ended long ago. We just want products that work. I myself do use Microsoft products, even at home - where they are the best solution, so I use Microsoft Media Center for example. Sadly this is now being neglected by Microsoft.

Nov 13, 2014 7:56 AM in response to John Lockwood

Im experiencing the same problem here since migration to Mavericks-Server.


Mostly MS-Word-Documents.

First theWord-App hangs, then the Finder isn't reappering after reset, the only thing is to reset the Client-Mac, or to disconnect from the server (plug-out the cabel) but both of them result in locked--files on the server.

a further culprit to the situation is the automatic re-opening of Word-documents, which where unsaved, that can result in rebooting the client-mac, and the problem persists.


Does anybody know if this faulty behavior still exists with Yosemite-Server?


I use a bonded uplink (2*1GBit) to the switch.

Dec 5, 2014 7:42 AM in response to Mark Burr

Pages and Numbers would fix the problem as they don't use the sort of safe save system that Office does, which at least partly causes the problem. Having all computers on Yosemite (using new SMB as a result) doesn't seem to have solved the problem, and indeed has introduced plenty of new ones (out of memory errors, when the computers clearly aren't, and the new and mysterious 'document not saved' errors that come up on trying to save Excel files, requiring you to move all sheets into a new Excel file before saving afresh. Useless.


I contacted Microsoft support who, after much ******* around asking questions unrelated to the issue, finished by saying that I would need to open a paid support ticket to look into the issue, as it doesn't fall under installation issues, and as such isn't covered by their support policy. ********.


In short, Mac Office and any kind of Mac OS Server setup are still a glorious mess to work with. Maybe someone from Apple or Microsoft could chime in with some more useful tips, or indeed a fix.

Dec 7, 2014 9:55 AM in response to Chris Billett

I noticed also Yosemite was causing different errors too as they upgraded 2 machines to it before I managed to stop them doing the rest. ( out of memory, document not saved )


I downloaded and installed the SMBConfig application to force all the machines to use SMB1 but hasn't really made any difference.


I'm also assuming moving up to Yosemite server isn't going to help either....


I think my only viable solution for the client to is try them on pages and numbers and migrate them over and ditch MS altogether.


From the thousands of articles online when I've searched, it would appear the problem exists even if you use a Windows server/clients.


Such a shame you can't just turn off the 'safe save' within the MS apps....

Dec 7, 2014 10:25 AM in response to jimsoxz

Hi,


This has been going quite a while now even with earlier versions of Office.

The local user who connects to the server has an local UserID, which in a managed environment usually means UserID 502.

When you use an Office product like Word, Word creates a TemporaryItems folder on the root of the share and creates a userfolder 502 to store it's temporary files in. This will work quite some time, but then 2 users simultaniously save a file and that's when all **** breaks loose.

The only permanent way I have found was to migrate the local user to a different UserID, for instance starting from 503 and so on.

In a small environment, just create a couple of empty users and then migrate the old user to a new useraccount. This will take some work, but it will make Word functional again with any share.

Settings permissions for everyone and a sticky bit on the .TemporaryItems will only go so far. The main issue is with the local userID.


The way to change the local userID:

http://www.inteller.net/notes/change-user-id-on-snow-leopard/


Goodluck!


Jeffrey

Dec 7, 2014 12:06 PM in response to Mark Burr

If only it were that simple... but no.

That option will not deliver the same result, but will bring chaos to your user.


You need to follow the steps in order to show the OSX operating system that all the folders, that UserID has been tied to, have been updated.

Otherwise the user will experience strange behaviour in the trash can for instance, that will still be connected to the old userID, if you were to change the userID with systempreferences.

Invest some time in it, and it will work.

Aug 20, 2015 6:37 AM in response to jepping

This happens at at least three of our clients using Mac OS X Server. It has been impossible to get a fix for. We have tried forcing SMB1, changing .Temporary Items to chmod 777 and now 1777 and I have completely blown out open directory and created all new users with unique IDs before.


Apple, you had a great working system in 10.6, then fell off the ledge at 10.7, how can sharing files be this hard? Give a crap and fix it.

file locking with OSX Server & Microsoft Word

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