Ubuntu can’t sync Dropbox. Wants a supported file system.

I have a standard Ubuntu installation. With encrypted home. And Dropbox installed everywhere. Except fridge. macOS, CentOS, Windows, Android, iOS… But Dropbox has stopped loving Linux.

/dev/sdb2 on / type ext4 (rw,relatime,errors=remount-ro)
/home/.ecryptfs/loop/.Private on /home/loop type ecryptfs

Requirements. Wait a minute:

A Dropbox folder on an ext4-formatted hard drive or partition

But ecryptfs is not supported.

So how we can manage with it? Make unencrypted file system on encrypted home and put Dropbox folder inside. How to do that?

  1.  Unlink this host:
  2. Quit Dropbox
  3. Make storage file (count depend of your Dropbox size)
    $ dd if=/dev/zero of=~/dropboxStorage bs=1024 count=3000000
  4. Make file system inside
    $ mkfs.ext4 ~/dropboxStorage
  5. Localize Dropbox folder and rename it:
    $ mv ~/Dropbox ~/Dropbox.mvd
  6. Edit fstab, change ownership of Dropbox mountpoint and mount it (now you don’t need sudo)
    $ mkdir ~/Dropbox
    $ sudo vim /etc/fstab    # at the end of fstab
    /home/loop/dropboxStorage /home/loop/Dropbox ext4 noauto,user 0 0
    $ sudo chown loop ~/Dropbox
    $ mount ~/Dropbox
    $ mount | grep Dropbox
    /home/loop/dropboxStorage on /home/loop/Dropbox type ext4 (rw,nosuid,nodev,noexec,relatime,user=loop
  7. I think this should be something other than:cp -a but beware. I have a lot of hosts linked and quicker and safer for me is download Dropbox again. But you cat try.
    $ cd ~/Dropbox
    $ (cd ../Dropbox.mvd/ ; tar cf - *) | tar xf -

    I connected the machine that had not been synchronized for several months and  made problems for myself. All of my folder cleanings on my notebook (and others) was ruined. Fortunately Dropbox’s site has a trashcan where you can recover files.

    So, If you have important thing synchronized on many hosts put this machine as a new one. For your safety.

    So:  $ rm -rf ~/Dropbox/*

  8. Start Dropbox and relink again — it works!

Mount after login

Now we have put mount operation to the user’s start script, so:

$ echo -e "\n# Mount storage for Dropbox from fstab\nmount ~/Dropbox\n" >>  ~/.bashrc

No, no, no… This will start with each terminal session with message Storage is already mounted. We don’t want that way. So run

$ gnome-session-properties

and then edit Dropbox command and add mount ~/Dropbox &&  before dropbox launcher. Here:

or from terminal here:

$ cat .config/autostart/dropbox.desktop 
[Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=mount ~/Dropbox && dropbox start -i
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
X-GNOME-Autostart-enabled=true

What if something goes wrong?

Version of packages are changing from time to time. In case when something goes wrong and you will see the featured image from the top of this article just quit Dropbox app. Then open Dropbox drive in the gnome Files app. Then you can run Dropbox again and everything should be okay.

If I find a better way I’ll update this manual. I promise.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.