Office 2008 Mac OS X Won’t Write To Samba Share

I deployed a FreeNAS server last week, and FreeNAS uses Samba for SMB / CIFS file sharing services. Everything went smoothly, but today I was informed that one of the users was having trouble Saving Excel files directly to some folders. He had been saving to his desktop and copying across, which worked. That means the folder permissions for his user were ok. What was going on? I isolated the problem to Office 2008 on his Mac OS Snow Leopard machine. I also isolated it to the fact that it was happening only when he saves as the native file formats (xlsx, docx), saving as Office 2003 files worked fine. What was doing on?

Microsoft Excel cannot access the file “server:path:to:file”
There are several possible reasons:

- The file name or path name does not exist
- The file you’re trying to open is being used by another program. Close the document in the other program, and try again.
- The name of the workbook you’re trying to save is the same as the name of another document that is read-only. Try saving the workbook with a different name.

It turns out that when saving the native format, Office 2008 will save to a temporary file, write to that file, then rename that file to the real file. The problem? When creating the temporary file, it was setting it read only. I have no idea why. I found the solution after a lot of searching on Google (I found lots of suggestions, but no solutions that worked). The solution is to disallow users to be able to change the permissions on files that are created, and to force a file creation mode.

On the share in question:

create mask = 0775
force security mode = 0775

Leave a Reply