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

Shared Excel/Word files corrupting/becoming read only on 10.9.1 Server, 3.0.2

I've had a few users reporting strange errors this past week since updating to 3.0.2.


When trying to open some MS Excel or Word files that are stored on a network share, the files will open only as read only or give a file corrupt error. I thought that this may be related to possible client network disconnects (thought the clients aren't reporting any) and the hidden lock files that MS Office creates for docements not getting deleted. I am able to open the files without issue on the server and save the files with a differnet name (ie version_b) and then users can open the files again. After showing hidden files in Mavericks, I'm not seeing these hidden lock files after users exit word or excel, but if I change the name of the saved (working) file back to the original and replace the orignal, once again it's unable to be opened.


These errors are occuring over both afp and smb connections, but only on client machines running 10.8.5 and 10.7.5. I've not noticed this issue on any 10.9.1 machiens that we have in service.


I've also double checked folder and file permissions, and repropigated, and all looks to be fine there.


Has anyone come across anything like this before?


Thanks!

MAC MINI SERVER (LATE 2012), OS X Mountain Lion (10.8.2), ios 6.0.1

Posted on Jan 10, 2014 5:42 PM

Reply
14 replies

Jan 11, 2014 8:09 AM in response to fkick1

Sorry about the terse reply above. Had a detailed reply written, then lost all of it due to a page refresh...


MS Office products create a hidden older on the root of the drive (or rot of the share), called .TemporaryItems. Inside .TemporaryItems, a subfolder is created for each user. These subfolders are named using the user's unix accountID number. By default, macOS assigns 501 as the account number of the first user created locally on a system. 502 for the second, et cetera. If you have multiple workstations, and user accounts created locally on them, then you'r liable to have multiple users that are UserID 501 on their local system (same with 502, 503, et cetera). In contrast, accounts created on the server will have UserIDs starting at 1001, 1002, etc. Another difference is that server account IDs will actually be unique, because there's only one server.


The problem occurs when you have multiple users trying to claim read/write access to the same temporary files in the 501, 502, 503 (etc.) folders. It is a true file-in-use contention situation.


There are a vareity of ways to resolve it. The approach I used is to NOT create local accounts on the individual macs. All accounts are managed by the server, so no account number reuse issues. For users that travel, I then generate Portable Home directories on their mac. Their portable account will still have the unique account number assigned by the server (numbers starting at 1001 and up).

Jan 11, 2014 8:20 AM in response to cpragman

Thanks cpragman. I'll take a look at the temporyitems folders.


We are a big byod company as we deal with a lot of free lancers that come and go, so Users have also been logged into their machines as local users and connected to the shares with their OD accounts. We've been running this setup for the last three years, and it's only since our update to mavericks that this had become an issue. Perhaps there's a permission corruption on the .Temporyitems folders causing issues. I'll let you know what I find.

Jan 11, 2014 9:37 AM in response to fkick1

Given that you have a lot of BYOD devices that you can't really control the configuration of, the suggested option is to make the ".TemporaryItems" folder on the root of each server share completly promiscuous (read/write by all), and set the sticky-bit so as to prevent anyone from deleting the folder. If anyone can delete the folder, then the next time it is created, it won't have your custom permissions.


Read here:

https://discussions.apple.com/thread/2720016?answerId=13262056022#13262056022


Particularly this comment in that thread.


Open a terminal on the server, and then type


sudo chmod 1777 /Users/.TemporaryItems


(or whatever your folder is...)


You should see the premissions with 'ls -la'


drwxrwxrwt+ 12 root wheel 408 Oct 13 13:01 .TemporaryItems


The sticky bit (the '1' in the command that produces the 't' in the permissions) allows only the owner (root) to delete the folder even if everyone has write permissions .


Ciao


STMAC



You will need to do this to the .TemporaryItems folder on the root of each share you have defined on the server. If one doesn't exist in one or more of your shares, might as well create the folder now and set it's permissions, because it's only a matter of time before the problem occurs on that particular share.

Feb 11, 2014 5:38 AM in response to fkick1

Due to the keychain issue with Mavericks Sever, at the moment I have local users on each machine. I am experiencing the same issue with some Word and Excel documents opening as Read Only. The local users have the same credentials as that of the network users on the server, so they access the shares with their network credentials (odd I know - but until apple fix the incredibly frustrating Keychain issue it's the only way at the moment - thats for another thread!)


I have changed permissions of the .TemporaryItems directory in the share root, and in the root of the drive. User uploaded file

I have also disabled quicklook on the server and on the client.


The Owner of every file in the share always seems to be set to 502.


User uploaded file


I still have the issue of the files opening Read Only.

Any other ideas? Appreciate the input as this issue is doing my head in! So many niggly issues with Mavericks Server still!

Jun 23, 2014 9:06 AM in response to fkick1

Hi All,


I managed to temporarily fix this issue for now.

I have had to change the UID of each local user on every machine to a unique UID. Then repair permissions for the network share.

Then add a script to logout of each user using the logout hook. This script should un mount all network shares. The issue stems from a combination of matching local UID's if using local logons (as I am) and drives not unmounting on logout and login. Therefore two volumes are mounted with different names and Microsoft cannot handle two volumns mounted from the same drive.

Jan 22, 2015 7:55 PM in response to fkick1

Hi, I've just come across this problem tonight and after a bit of playing around, for me, I was trying to save the file with a forward slash / in the title and it saved as read only. When I changed to a - there was no problem saving the file so that I could then edit it. I presume that there's a problem with some characters in the code. I'm not speaking as an expert just someone who's had a bit of a play around. I hope this helps.

Mar 10, 2016 8:20 AM in response to RoadRunnerBeepBeep

Hay Road Runner.. Voila..!! What a star you are I have ben trying to fathom out how what my excel document was read only.. .. You saved the day!! It was indeed, because I was putting a '/' in the title as I was saving it.. As soon as I took away/removed the '/' (forward slash) Hey presto! document is no longer 'read only'!! It was such a simply and clear explanation.. I am most grateful to you!! THANK YOU😉

Shared Excel/Word files corrupting/becoming read only on 10.9.1 Server, 3.0.2

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