Extended attributes, Office 2007 clients via SMB from Xsan

| 2 Comments | No TrackBacks

We recently deployed Mac OS X 10.6.2 Server, sharing files on an Xsan volume via Samba to Windows users with Office 2007. When these PC users try to download or open the file, however, they got this warning, "Error Copying File or Folder. Cannot copy FILENAME: Cannot find the specified file. Make sure you specify the correct path and file name."

Some forums suggested adding two parameters at the very end of your /etc/smb.conf file:

[global]
    ea support = yes
    stream support = no

I've edited this entry to reflect some changes in late 10.6 Samba releases. Further, with the right smb.conf configuration, the changes below to various EAs  don't need to be made.


We I noticed that I could download the .doc files to my Mac via AFP, make a neglible modification and save the file, then upload it back to the SAN, my Windows colleagues could then view the file. When I did an ls -l@ on the file, I could see that this process added the com.apple.ResourceFork extended attribute. At this point, the modified Office files could be opened by my PC friends.

So, ironically, rather than deleting the EAs, I needed to apply this EA to the right files. It's probably OK to write this EA on each file and directory, but that's a little heavy handed. So instead, I executed this command:

find /Shares/Docs -name "*.doc" -print0 | xargs -0 sudo xattr -w com.apple.ResourceFork  

This will find the files with the .doc extension in my /Shares/Docs, add the extended attribute, and make everyone happy.

If you want to make it more thorough, you could try:

find . \( -name "*.doc" -or -name "*.docx" -or -name "*.xls" -or -name "*.xlsx" -or -name "*.ppt" -or -name "*.pptx" \) -print0 | xargs -0 xattr -w com.apple.ResourceFork   

One possible issue, though, is that if you apply this command too high up the hierarchy, it seems to make a problem. You might get this error: unable to execute /usr/bin/xattr: Argument list too long

You may wish to recursively apply this further down the directory tree.

No TrackBacks

TrackBack URL: http://www.stanford.edu/group/macosxsig/cgi-bin/mt/mt-tb.cgi/85

2 Comments

Hi,

we run into the same issue, XSan 2.2 with xattr, reshared via SMB&AFP. The strangest thing was that the error occur only when you try to copy to NTFS-formatted disks, and not FAT. What did the trick for us was to comment this line:

; vfs objects = darwinacl,darwin_streams

in /etc/smb.conf and restarting the server. Banged my head on the wall for two weeks over this!

regards,
alessandro

Leave a comment

About this Entry

This page contains a single entry by Noah Abrahamson published on December 16, 2009 11:51 PM.

Build WebAuth with Mac OS X Server 10.6 (Snow Leopard) was the previous entry in this blog.

ACLs not being properly honored in Samba with XP clients is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.