«

»

Mar 15

Preserving Legacy File Dates in Alfresco over SMB – Updated

I wrote previously about a workarounds for preserving file creation dates when migrating legacy content into Alfresco over SMB.   As of OS X Yosemite update 10.10.2 changes to Apple’s OSX SMB implementation ‘break’ the prior workaround.

Apple seems to be regularly messing with the SMB implementation in OSX, probably in attempts to make sure Macs play nice with NAS devices and windows shares.  Forums are replete with Mac SMB problems suddenly appearing after various OSX updates.

In any case, Apple made SMB changes in OSX 10.10.2

“Improves performance for browsing DFS shares in the Finder”

…and as of that OS, MuCommander on Mac no longer preserves file creation metadata from legacy file systems. I now can’t find any SMB or WebDAV approaches or applications to address this directly in MacOS.

MuCommander does preserve file create dates on my install of Win7 and Fedora 21. I was able to put together a Mac solution using a Fedora 21 VM in Virtualbox on a Mac host that,while a pain, doesn’t involve any license cost.   The process was a little involved, but here is a basic outline:

  1. Install Virtualbox on Mac.
  2. Pick and get a linux distro.  I read somewhere that MuCommander requires straight up Oracle Java, so I picked on where I could use the RPM installer from Oracle – in my case, Fedora 21.  I certainly could have picked a ‘lighter’ distro, but for this use case I would definitely want shared folder support in the VirtualBox VM so getting guest additions installed easily was a concern as well.
  3. Create a VM in Virtualbox and install Fedora.   Update and distro-sync.
  4. Install VirtualBox Guest Additions.  This still works.
  5. Configure shared folders to point to the legacy files (or a local staging area).  Make your shared folder settings permanent and automount in the VirtualBox options dialog.  Remember to add your user to the vboxsf user group to get permissions on the shared folders.  The default Fedora user manager doesn’t let you modify groups, so you will need the older one: via ” sudo yum -y install system-config-users”.  Invoke from command line – ” sudo system-config-users”  in Fedora, your shared folders automount into /Media.
  6. Install Oracle Java using the x64 RPM (or as applicable for your distro)
  7. Select Oracle Java instead of openJDK using ” sudo alternatives –config java”
  8.  Download the “Linux/Other” version of MuCommander.  Uncompress somewhere handy and easily navigated to via command line.
  9. In terminal, navigate to your MuCommander install and execute via “sudo ./mucommander.sh” , From there, you can connect to your SMB server and MuCommander preserves file dates.

If FTP is enabled on your Alfresco server, FileZilla on Mac works to preserve file dates provided you choose Transfer | Preserve timestamps of transferred files.  H/T to the Alfresco Gurus over at the Alfresco Forums.  Without FTP, on Mac it looks like the convoluted VM route is, at least, functional if clunky.  Maybe this info will help others facing randomly appearing SMB issues on Mac.