The Core Technologies Blog

Our Software // Windows Services // 24×7 Operation


Why you should Disable Smart Sync when Running Dropbox as a Windows Service

Dropbox Smart Sync

What is Dropbox Smart Sync?

The team at Dropbox says it best:

  Smart Sync is a Dropbox feature that helps you save space on your hard drive. Access every file and folder in your Dropbox account from your computer, using virtually no hard drive space. Smart Sync is available for Dropbox Plus and Professional customers, and members of Dropbox Business teams.

And this short video discusses the considerable benefits of Smart Sync:

Indeed, Smart Sync has been a very popular feature since its debut in 2017.

How Smart Sync works: Supporting technologies

Smart Sync leverages a trio of Windows capabilities:

1. NTFS Sparse Files technology

NTFS Sparse File functionality allows Dropbox to create an “empty shell” for any file — with all the usual information (name, size, etc.) but with none of the actual content.

So when you create a file on Dropbox.com, the file’s information (its “metadata”) is immediately downloaded to your computer but none of the file’s contents are transferred in that operation. As a result, you can see the file on your system but it consumes almost no space on your hard drive. Very efficient!

But what happens when you try to access the zero-content file? That’s where the next technology comes in…

2. Windows file system Minifilter driver technology

When you access a file in your Dropbox folder, demanding to see its content, a Windows Minifilter driver ensures that the file’s contents are quickly fetched from Dropbox.com. The arrangement is fairly technical, but the following example illustrates the basic concept.

Suppose you have an online-only file called “notes.txt” in your Dropbox folder. Its contents have not yet been downloaded to your computer. When you double-click on the file:

  1. Windows starts Notepad (the program associated with .TXT files), passing it the full path to notes.txt.
  2. Notepad calls the Windows API ReadFile function to grab the contents of notes.txt
  3. But before invoking ReadFile, Windows intercepts the operation and notifies the Dropbox Minifilter that a program would like to read the contents of notes.txt.
  4. The Minifilter, seeing that the file’s contents have not yet been downloaded, arranges for the file’s contents to be retrieved from Dropbox.com and saved on the local PC.
  5. Windows next calls ReadFile, which returns the contents of the file.
  6. Notepad displays the contents of the file.

Most of the magic happens in step 4. The next section examines how that works.

3. Windows Interprocess Communication (IPC)

At first, we thought that the Minifilter component did all the heavy lifting, downloading content as necessary. However Dropbox says otherwise (the Minifilter is a “system extension”):

We don’t use system extensions to make network requests
We don’t use system extensions to parse any data in the filesystem
We don’t use system extensions to read or write files

Clearly the Minifilter isn’t downloading the files from Dropbox.com. So what’s doing it?

The answer: Dropbox.exe — the process run when you launch Dropbox on your desktop.

So when you request an “online-only” file not yet on your hard drive:

  1. The Minifilter receives the request.
  2. The Minifilter contacts the Dropbox.exe process and asks it to get the file.
  3. Dropbox.exe goes out to the Internet and downloads the file from Dropbox.com.
  4. Windows makes the file available to the user.

The Minifilter and Dropbox.exe interact using Windows Interprocess Communication — a collection of technologies supporting communication between different programs.

Now that we understand how Smart Sync works, let’s highlight three implications of the technical architecture.

Implication #1: Files cannot be downloaded without an Internet connection

This shouldn’t be a surprise.

Since files are fetched from the cloud as needed, you must be connected to the Internet to download files from Dropbox.com.

Dropbox confirms this limitation in their FAQ as well:

Can I access online-only content when I’m not connected to the internet?
No, online-only content isn’t stored locally on your computer. Connect to the internet to access online-only content.

Implication #2: Files cannot be downloaded if Dropbox isn’t running

As mentioned before, the Dropbox process (Dropbox.exe) plays a key role in downloading “incomplete” Smart Sync files. No file can be downloaded if Dropbox is not running.

To be clear, the Minifilter is always notified when you try to access an “online-only” file in the Dropbox folder. But if Dropbox isn’t running, there is no way for the Minifilter to download the file. The operation fails and you get a wonderful “Unspecified error” message (pictured here from the Dropbox forums):

Unspecified Error when opening a file

Note that this behavior only occurs when Smart Sync is on. Without Smart Sync — where Dropbox synchronizes all files to your hard drive — each document you see on your computer is readily available whether Dropbox is running or not.

Implication #3: Files cannot be downloaded if Dropbox is running as a Windows Service

Perhaps the most subtle consequence of the Smart Sync architecture has to do with background operation. Specifically, the Minifilter and Dropbox must operate in the same Windows Session for the two to communicate.

This is not a problem when you use Dropbox interactively on the desktop. All components run in the single logon session and Dropbox downloads files on demand, as expected.

However, customers running Dropbox as a background Windows Service face a problem. Dropbox will be running in Session 0 (the home for all Windows Services), while the Minifilter will be operating in the user’s interactive session (for example Session 1). The components will not be able to communicate and the files cannot be downloaded or opened. The “Unspecified Error” will abound.

So if you’re running Dropbox as a Windows Service (perhaps with our AlwaysUp utility), you should definitely turn Smart Sync off. Read on to find out how to do that.

How to Disable Smart Sync

You have a couple of options. You can either disable Smart Sync for specific folders, or turn off the feature entirely.

Disable Smart Sync for a single folder

This video illustrates how to adjust your Smart Sync folder settings:

And here are the step-by-step instructions to disable Smart Sync for a specific folder only:

  1. Click the Dropbox tray icon (Dropbox tray icon) to open the Dropbox menu
  2. Click the folder icon in the upper right:
    Open Dropbox Folder
  3. Find the folder that you would like to change. Right-click that folder and select Smart Sync > Local from the menu:
    Set Smart Sync folder to Local

That’s it. In a minute or two, the Dropbox process will notice the change and will download the entire folder to your hard drive.

Turn off Smart Sync for your Dropbox Plus, Professional, or Business account

To turn off the Smart Sync feature entirely, please follow these instructions to opt out of the system extension on Dropbox.com.

Dropbox Business team administrators can deactivate Smart Sync by opting out here (sign in required).

Questions about Smart Sync? Need Help?

Please get in touch and we’ll be happy to help — with this or any Dropbox feature.

Posted in Dropbox | Tagged , , , , | 2 Comments

2 Responses to Why you should Disable Smart Sync when Running Dropbox as a Windows Service

  1. William Kleinhenz says:

    Smart sync prevents me from doing an Excel upgrade because it things the program is still open. How do I upgrade with Smartsync?

    Can I temporarily stop it, or close the Microsoft 365 program and then do the upgrade?

  2. Hi William.

    To be clear, are you talking about the SmartSync backup program? If so, we don’t have much experience there, sorry.

    Or are you having trouble with Dropbox? If so, you should make sure all copies of Dropbox.exe are closed before upgrading Excel. Use the Task Manager to terminate all 3 instances of Dropbox.

Leave a Reply

Your email address will not be published. Required fields are marked *