When I try to download/save files/attachments from Firefox/Thunderbird, I get a 0 byte file in my Downloads directory.

I have tried all possible permissions but no difference. In both cases, it works if I save to a folder outside my home directory (eg /tmp/downloads/) with the right permissions. My home directory is encrypted with fscrypt, not sure if this could be the issue.

This is on a fresh Disco minimal install. Firefox pre-installed, Thunderbird installed from default repositories. This issue doesn't affect any other programs.

Posted a bug report here but seems possibly not a bug: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1828011


It is a confirmed bugs— you can see follow-up https://bugs.launchpad.net/firefox/+bug/1796661.

Someone describe steps to reproduce the problem, the detail is very similar to yours.

Steps to reproduce:

I encrypted my homedir (on Ubuntu 18.04) with fscrypt following this tutorial : https://tlbdk.github.io/ubuntu/2018/10/22/fscrypt.html Then, I try to download any file from internet with Firefox in my Download folder, in my homedir (or any encrypted folder).

Actual results:

The download instantly breaks. Only a 0kb file appears with the correct name.

Expected results:

The file should be downloaded correctly.

The http://tlbdk.github.io site owner has explaining what might cause the bugs to occurs.

The issue is because firefox does a rename from the /tmp folder to the encrypted home folder, right now fscrypt returns EPERM instead of EXDEV that would be normal when the operation can not complete because of crossing a mount point or in this case unencrypted to an encrypted folder.

Currently there's no proposed fix, so you can only wait.

A workaround is to bind /tmp to a folder within your home directory (may cause other issues), or as a tmpfs. According to this, a fix from fscrypt has been merged into Linux 5.1

  • 1
    Thanks Jim, don't know how I missed that. Not sure how much value my question adds, can delete it if need be, in the mean time accepting your answer.
    – carderne
    May 13 '19 at 11:32
  • For anyone else, I've got around this following tlbdk's suggestion (github.com/google/fscrypt/issues/76#issuecomment-456976770) by binding /tmp to a location in my home directory as follows: sudo mount -B ~/.tmp /tmp
    – carderne
    May 13 '19 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.