Because I have an encrypted home folder on an ext4 formatted volume, Dropbox stopped working.

DropBox warning message

Luckily, Alan Pope has a solution at his popey blog.

He essentially has created a shell script for you to download and run (after shutting down DropBox on your computer and backing up all of the files).

After downloading the script (I simply copied and pasted it inside a text editor and then saved it as a file called move_DropBox.sh), make sure to edit it to adjust the size of your DropBox folder. For instance, I only need 10G for my DropBox files, so I changed the reference in the shell script from 20G down to 10G.

Then, you need to make the script executable with this command:

$ sudo chmod 777 move_DropBox.sh

To run the script, type the following command:

$ sudo ./move_DropBox.sh

The shell script will take 5-10 minutes to run (more or less), depending on your computer CPU, the speed of your hard drive, and the size of the dropbox image file that is being created.

To test the result, I logged out and then back in. Sure enough, I now have a new disk image file called Dropbox mounted on startup. But, DropBox threw up a warning about file permissions. It appeared that the files inside the new DropBox image were connected to the root user, not me.

The following command fixed that error:

$ sudo chown -R username:username /home/username/Dropbox

Note: make sure to substitute username with your actual username on your computer. This command makes me, not root, the owner of all files and folders of Dropbox. It looks like the last two commands in the shell script did not work for me, and this command fixes that error.

So, when I typed dropbox start, everything worked, and DropBox is now running and synced again.

Note: Hat tip to http://planet.ubuntu.com/ for rebosting Alan’s DropBox fix. My thanks to both.

UPDATE (27 Dec. 2018): Rebooting the computer led to an ultra serious error that prevented the computer from completing the boot process. Yikes. The error concerned a failure to mount a volume, and I tracked down the error to the new fstab entry for mounting my new DropBox volume. The solution was to comment out the new fstab entry by putting a # in front of it.

Now, the computer boots without a hitch. But, DropBox does not start (as the volume where all the files are located does not exist at startup). The solution is to run the following command:

$ sudo mount -o loop .dropbox.img /home/username/Dropbox

I then run dropbox start, and DropBox runs without a hitch. Ideally, I need an automated solution, so I need to get the fstab entry working. I am short on time, however, so this solution works for now. After all, this computer only gets rebooted around every blue moon. That’s the nice thing about Xubuntu (and Linux in general): flexibility.