[snap only] thunderbird.tmp outside of proper place for temporary files (in user Downloads)
Categories
(Thunderbird :: OS Integration, defect, P3)
Tracking
(thunderbird_esr128 affected)
Tracking | Status | |
---|---|---|
thunderbird_esr128 | --- | affected |
People
(Reporter: nobodyman665, Assigned: dandarnell)
References
Details
(Keywords: snap)
Attachments
(1 file, 1 obsolete file)
275.04 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0
Steps to reproduce:
Install fresh Ubuntu 24.10 x64 .
sudo apt-get install thunderbird
Y
wait until ready
run Thunderbird
Look for inappropriate files in $HOME/Downloads
Actual results:
thunderbird.tmp is present in $HOME/Downloads .
thunderbird.tmp reappears after deleting it manually after each Thunderbird (ver. 128.3.1esr (64-bit) , by the way) launch.
thunderbird.tmp is not present in whichever place is appropriate for Mozilla Thunderbird's .tmp files.
Expected results:
$HOME/Downloads contains user's downloads.
Whatever utility folder Thunderbird uses contains thunderbird.tmp .
User downloads and thunderbird.tmp do not mix.
Reporter | ||
Comment 1•5 months ago
|
||
Comment 2•5 months ago
|
||
I am also seeing this with 128.3.1esr on Ubuntu 24.4.
Comment 3•5 months ago
|
||
https://searchfox.org/comm-central/rev/d848039720bedf2c2b5f7ba8f37b2c670e38b605/taskcluster/docker/tb-snap/tmpdir.sh#4 does that, but indeed that does not seem appropriate. I don't know why the normal temp dir isn't used.
(In reply to Magnus Melin [:mkmelin] from comment #3)
https://searchfox.org/comm-central/rev/d848039720bedf2c2b5f7ba8f37b2c670e38b605/taskcluster/docker/tb-snap/tmpdir.sh#4 does that, but indeed that does not seem appropriate. I don't know why the normal temp dir isn't used.
Because /tmp is a private mount in snaps and not shared with the system
Comment 5•5 months ago
|
||
What is the right choice then?
Reporter | ||
Comment 6•5 months ago
|
||
Same with snapd version of Firefox - $XDG_CACHE_HOME ?
https://github.com/mozilla/gecko-dev/blob/ec82d34b786f309f9901efe989d59cb55bd61cf0/taskcluster/docker/firefox-flatpak/launch-script.sh#L2
Works to me, does not cause any unexpected things with very similarly fresh install of Firefox, stores files in expected place, does not mix with user files.
Reporter | ||
Comment 7•5 months ago
|
||
Can't edit my own comments. Read "snapd" as "pre-packed".
Assignee | ||
Comment 8•5 months ago
|
||
Updated•5 months ago
|
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Comment 9•5 months ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #3)
https://searchfox.org/comm-central/rev/d848039720bedf2c2b5f7ba8f37b2c670e38b605/taskcluster/docker/tb-snap/tmpdir.sh#4 does that, but indeed that does not seem appropriate. I don't know why the normal temp dir isn't used.
This particular link is to our internal snap build for testing, not the one that is pushed to the snap store. The snap store version is on GitHub.
(In reply to Aliaksandr from comment #6)
Same with snapd version of Firefox - $XDG_CACHE_HOME ?
https://github.com/mozilla/gecko-dev/blob/ec82d34b786f309f9901efe989d59cb55bd61cf0/taskcluster/docker/firefox-flatpak/launch-script.sh#L2
Works to me, does not cause any unexpected things with very similarly fresh install of Firefox, stores files in expected place, does not mix with user files.
This is actually from the Firefox Flatpak, not the Firefox Snap. The Flatpak is able to access the standard tmp directory without any extra permissions.
There is currently an open GitHub issue concerning the TMPDIR issue.
Updated•5 months ago
|
Updated•5 months ago
|
Reporter | ||
Comment 10•4 months ago
|
||
I as mere user don't see much of a difference.
I as mere user also don't see what are my options to get rid of this junk in least amount of actions with least amount of consequences.
Rollback to pre-snapd-being-mandatory was an option back in 24.04 days. And here and now I'm... a bit too busy and a bit too unskilled to go on a voyage of apt usage and repo linkage just to get rid of one pesky folder. Was unable to set up non-snapd official version of Thunderbirs by usual means.
Updated•2 months ago
|
Assignee | ||
Comment 11•13 days ago
|
||
Unfortunately, this bug is outside the scope of what we can do. Snaps cannot access the user's temp directory without a major increase in filesystem permissions. The Firefox snap actually handles this problem the same way we do, putting the temp directory in ~/Downloads
. [1]
This quirk is a side effect of snaps being sandboxed, and allowing the use of TMPDIR
by the Thunderbird snap would break the sandbox. The best place I've found to follow movement on the issue is the GitHub bug I linked in comment 9. [2]
If Canonical adds scoped filesystem permissions (or some other sandboxed mechanism) to access TMPDIR
, we can definitely add the option to let the user map the temp directory, or just default to TMPDIR
. However, given the current design of snap's sandbox, we cannot add this. I'm closing this bug for now, but will reopen it if the situation changes.
[1] https://forum.snapcraft.io/t/accessing-tmp-from-snaps/22384
Comment 12•9 days ago
|
||
The snap cannot write to /tmp
because of snap confinement and the thunderbird.tmp has to go somewhere. ~/Downloads
is currently the location but https://github.com/ubuntu/thunderbird/pull/29 allows you to overwrite that location, as long as it's still somewhere in $HOME
so that the snap still has access to the location.
Updated•9 days ago
|
Description
•