Linux Kamarada

Encrypting the Dropbox folder with VeraCrypt

Dropbox is one of the most popular cloud services and one of a few that offer a sync client for Linux. Recently, some of its users received a warning:

Dropbox will stop syncing in 7 days. Move your Dropbox folder to a supported file system.

Dropbox will stop syncing in 7 days. Move your Dropbox folder to a supported file system.

My laptop dual-boots Linux and Windows and I have installed the Dropbox sync client on both systems. My Dropbox folder was on a shared NTFS partition.

But Dropbox has announced on its forum that starting on Nov 7, 2018 supported file systems will be restricted to the most common ones for each operating system: NTFS for Windows, HFS+ or APFS for Mac OS X, and clean (not encrypted) Ext4 for Linux. The move is intended to provide a stable and consistent experience. That’s not entirely bad news because chances are that your system already has an Ext4 partition.

Use the GParted application to look at your partitions and file systems:

Or, in case you prefer the command line interface, use the fdisk command:

1
# mount -l

None of my partitions are Ext4. So, at least in principle, I won’t be able to sync Dropbox on Linux, only on Windows, providing my Dropbox folder remains on the NTFS partition.

But I use Linux much more often than Windows, so I looked for an option to keep on syncing on Linux. I found a solution with the bonus of increased security: to store the Dropbox folder on an encrypted VeraCrypt volume, which would secure the files in case I lose my laptop or it is stolen, for example.

VeraCrypt is a file encryption software about which I have already written:

I strongly recommend that you read that post before going on.

An encrypted VeraCrypt volume may be an alternative for those who currently store the Dropbox folder on an encrypted Ext4 partition, because VeraCrypt encrypts files “behind the scenes”, in a way Dropbox is not aware that they are being encrypted.

Note: VeraCrypt only ensures confidentiality for the files on disk. For instance, if a malicious person knows your e-mail and password, he or she is able to access the same files by the Dropbox website using a browser. VeraCrypt also does not dismiss the use of other security tools, such as antivirus and backup.

A disadvantage of that solution is that it requires the manual work of mounting the encrypted volume and starting the Dropbox client whenever it is necessary to sync. So I recommend that you read the entire post before acting, to decide whether my solution really helps you.

Before starting

To avoid problems, make sure your files are synced. That is true if you click the Dropbox icon and read Up to date on the menu that appears:

Also in that menu check the available space for your Dropbox account. I have 5.8GB of space. Usually new accounts start with 2GB.

Creating the encrypted volume

Launch VeraCrypt and follow the VeraCrypt how-to to create an encrypted file container / standard volume. Here I’m going to highlight only some specifics of our Dropbox volume.

The Volume Location can be any, because that information is not visible to the Dropbox client. The volume itself is a file like any other, so it can be stored on that NTFS partition, for example, as long as it has available space, there is no problem.

The Volume Size must be equal to the available space for your Dropbox account (or bigger, to be safe):

As we specified a size bigger than 4GB, the Volume Creation Wizard asks about Large Files:

If you plan to store large files (larger than 4GB) in the volume, select the second option (I will store files larger than 4 GB on the volume). Otherwise, select the first. In doubt, select the second. Click Next.

On the Format Options screen, the volume must be formatted with the Linux Ext4 filesystem:

Click Next. The next screen asks about Cross-Platform Support:

As the volume is going to be used only on Linux, select the second option (I will mount the volume only on Linux) and click Next.

After creating the volume, mount it. Choose a slot and always mount the volume on the chosen slot, because you are going to inform the volume mount point to the Dropbox client. For instance, I chose the slot 10, so my volume mount point is /mnt/veracrypt10:

Moving the Dropbox folder

Create a folder called Dropbox inside the encrypted volume.

Click the Dropbox icon in the system tray, then click Preferences.

On the Dropbox Preferences dialog box, select the Sync tab and click Move:

Navigate into the encrypted volume mount point, select the Dropbox folder and click Choose:

Let Dropbox move your folder and its contents to the new location:

A progress bar is shown during the moving.

When it finishes, there is one more change to do. Select the General tab and uncheck Start Dropbox on system startup:

Click OK to close the Dropbox Preferences dialog box.

Daily usage

If you have read the entire VeraCrypt how-to (I suppose you have), you know the volume should stay mounted only during use.

When you don’t need to use your Dropbox files anymore, quit the Dropbox client (click the Dropbox icon and then click Quit Dropbox) and unmount the volume (VeraCrypt calls that operation dismount). Always quit the Dropbox client before unmounting the volume.

When you need to use your Dropbox files again, launch VeraCrypt, mount the volume and start the Dropbox client. In case you forget to mount the volume before starting the Dropbox client, it won’t find the Dropbox folder and complain about it:

References

Would you buy me a coffee?
If you really liked it, if it was really helpful for you, is it worth a coffee? If you want, you can "buy me a coffee" with PayPal or contribute to the project in other ways.

Comments

About

The Linux Kamarada Project aims to spread and promote Linux as a robust, secure, versatile and easy to use operating system, suitable for everyday use be at home, at work or on the server. The project focuses mainly on distribution and documentation.

Ads

Facebook

Author