Citrix ShareFile Sync on a New Computer with Existing Data

Switching over to a new computer is certainly fun for a geek, but getting back to a perfectly tuned configuration can be a lot of work, whether you synchronize (part of) your data to the cloud or not.

Migrating Data

What I like to do is simply copy all my data over. What used to be an easy (although lengthy) process has become more complicated with the use of tools that synchronize some part of my directory structure with their respective cloud. When I moved to my current PC just recently I was using two such tools: TeamDrive (which I use as a virtual file server for sensitive data due to its client-side encryption) and ShareFile. The interesting question is, of course, how the sync tool handles data that already exists locally.


In case of TeamDrive the process was fairly painless. Its sync client has a feature to tell it you already have the data so it need not download everything. Just make sure everything is in sync and keep it that way.

Then I installed the ShareFile Sync client for Windows. That proved to be a tougher nut to crack.

ShareFile Sync for Windows

First of all, it creates your local sync directory in %UserProfile%\ShareFile – not exactly my favorite location – and immediately starts synchronizing. Next, when you try to do the obvious thing and configure ShareFile to sync to your previous data directory it complains about the directory not being empty with the message “you can only sync to an empty folder”:

Citrix ShareFile Sync - Folder not empty

Personal Folder / My Files & Folders

So I turned to PowerShell and used the information I published earlier to configure that sync job manually: I deleted the auto-created sync job and recreated it with the desired target directory. While the PowerShell commands did not give me any error the Sync engine did not seem to be too happy with what I had done. It went on strike and refused to acknowledge the new sync job:

Citrix ShareFile Sync - no sync jobs

I had to delete the entire client state in %AppData%\ShareFile and %LocalAppData%\ShareFile to get it to cooperate again. I accepted the inevitable, deleted my local copy of the synchronized data and had ShareFile re-download everything. With that I had My Files & Folders back in a synchronized state.

Deleting the Default Local Personal Folder Sync Target

Once you have moved the synchronization target from the default to a directory of your choosing you might feel the inclination to delete the directory created automatically in the root of the user profile. That proves to be more difficult than necessary because ShareFile Sync alters the default file system permissions so that even administrators have only read access:

D:\>SetACL.exe -on C:\Users\helge\ShareFile -ot file -actn list
   SYSTEM           full                                 allow   container_inherit+object_inherit
   Administrators   read_execute+WRITE_OWNER+WRITE_DAC   allow   container_inherit+object_inherit
   HKW540\helge     read_execute+WRITE_OWNER+WRITE_DAC   allow   container_inherit+object_inherit

The same does not happen with the custom sync directory, the sync client luckily leaves its permissions as they are.

Shared Folders

As described earlier I had several shared folders configured to sync to different directories on my hard drive, some of which are quite big. I tried again with those sync jobs, and voilà, that worked without a hitch. Note: for each shared folder use a command like the following:

Add-SyncJob -ApplicationId 1 -ApplicationName "PowerShell" -Account 
-RemoteFolderName "xxxxxx-xxxx-xxxx-xxxx-xxxxxxx" -LocalFolderPath "D:\Some local directory" 
-AuthType 4 -UserName -SyncDirection 2 -Password "MY PASSWORD"

The ShareFile Sync client examined the local data, found it to be in sync, and that was it.


Apparently the ShareFile Sync client currently does not support initial synchronization of the personal folder with an existing local directory. But the same works flawlessly for additional shared folders.

2 Responses to Citrix ShareFile Sync on a New Computer with Existing Data

  1. Will July 10, 2014 at 14:34 #

    We had uncovered two unwanted side effects of using Enterprise File Sharing…

    1 – When a new computer is setup to sync the data; the date modified on all folders and files “synced” is the time the initial synchronization occurred (on that new device). This may be a problem if you’re searching for items modified within a certain timeframe. Unfortunately, it only preserves the date created, but not modified.

    2 – When a user within ShareFile “deletes” a file from the environment, it is not deleted on endpoint devices; but rather placed into the Trash (Mac) or Recycle Bin (Windows). It is then up to the user owning the device to manually purge those items.

    Working within the world of compliance – these two items pose a big risk to things like litigation holds or data containment.

    I would love to see an Enterprise Sync Tool – whether is Google Drive, ShareFile, Dropbox, etc – that has these two features; thus preserving the metadata of the document and the ability to accurately destroy.

Leave a Reply