Skip to content


Dropbox on Linux encrypted ext4 filesystem


(problems seem to be with ecryptfs not LUKS)

Comment #1:

Dropbox will work if you just create a local loopback file for an ext4 filesystem and mount the Dropbox folder on it.

comment #1.1:

algo646464 21 hours ago [-]

The above is a great answer.

To expand on this (from some googling). All of this requires root.

1) Create a sparse file (actual size depends on usage)

    truncate -s 100G /home/zzz/Dropbox.image

2) Create a ext4 filesystem on it

    mkfs.ext4 -m0 /home/zzz/Dropbox.image

3) Mount it as a loopback file system

    sudo mount /home/zzz/Dropbox.image /home/zzz/Dropbox-fs

4) Create / Copy your dropbox folder to Dropbox-fs

    sudo mkdir /home/zzz/Dropbox-fs/Dropbox
    sudo chown -R zzz.zzz /home/zzz/Dropbox-fs/Dropbox
    cp -r /home/zzz/Dropbox-original /home/zzz/Dropbox-fs/Dropbox

5) Start Dropbox and point it to the new location

6) If we want to mount this automatically at login. Adding it to /etc/fstab may not work because of encryption.

But perhaps some script at login to mount it will work. For example, we can create a script at /usr/local/bin/ and then add a line to /etc/sudoers

    zzz ALL=(root) NOPASSWD: /usr/local/bin/

Then somehow call this script at login of user zzz.