3

I download some file using chromium into the /tmp/ directory. Then, in a terminal, I look into /tmp/ and the file is NOT there. If I try to download it again, it is already listed in the /tmp/ directory (since it was already downloaded there, whatever 'there' means at this point).

Could it be that the download interface and the terminal refer to two different /tmp/ directories?

The interface for downloading the file is a graphical interface which offers the choice "Other Locations", and under this choice it offers "Computer", which shows the contents of a typical root (/) directory (usr, bin, home, var, etc.). From there I choose /tmp/ to download the file there. But thereafter, typing ls /tmp in a terminal does not show the file being there.

Any idea?

  • There are only one /tmp on your system. Please describe exactly what you are doing, commands and maybe screen-dumps of GUI tool. – Soren A Dec 30 '20 at 10:44
  • You may be running a snap utility! – FedKad Dec 30 '20 at 10:51
  • If you open Nautilus and then select Recent, if the file is listed there you can right click it with your mouse and then select Open item location which will take you to where it is stored. – graham Dec 30 '20 at 11:09
  • We don't know your OS & release. On recent releases, chromium-browser is a snap meaning it doesn't have full access to your file-system outside of $HOME, or (snap-connect) certain directories... so start with what OS & release you are using. – guiverc Dec 30 '20 at 11:59
  • Sorry, I had to edit my initial post because a crucial word "NOT" was missing in the second sentence. More information about OS used & stuff coming. – Emmanuel Dec 30 '20 at 22:01
  • The OS used is Ubuntu 20.04. Chromium is Version 87.0.4280.88 (Build officiel) snap (64 bits). Now the 'snap' hypothesis given by @guiverc starts to make real sense... – Emmanuel Dec 30 '20 at 22:05
  • And @FedonKadifeli – Emmanuel Dec 30 '20 at 22:11
  • The version of chromium doesn't matter, however yes you'll be using the snap version (use snap list to view your installed snaps). Snaps can have different confinement restrictions, classic can access your file-system (lowest level of security), however all other levels mean they see a pretend file-system that isn't your real one as the run confined (excluding $HOME or your user directory; that's real, and if you've snap-connect /media, /mnt they an be accessed too). The /tmp seen by chromium snap is NOT the /tmp you see a terminal/file-manager etc. – guiverc Dec 30 '20 at 22:22

1 Answers1

2

The version of chromium doesn't matter, however yes you'll be using the snap version (use snap list to view your installed snaps). eg. my system shows

guiverc@d960-ubu2:~$   snap list
Name               Version                     Rev    Tracking       Publisher         Notes
chromium           87.0.4280.88                1424   latest/stable  canonical✓        -

Snaps can have different confinement restrictions, classic can access your file-system (lowest level of security), however all other levels mean they see a pretend file-system that isn't your real one as they run confined (excluding $HOME or your user directory; that's real, and if you've snap-connect /media, /mnt they an be accessed too).

The /tmp seen by chromium snap is NOT the /tmp you see a terminal/file-manager etc.

guiverc
  • 30,396
  • If you need/want more information about the snap-connect I mention; see https://askubuntu.com/questions/1184357/why-cant-chromium-suddenly-access-any-partition-except-for-home/1184374#1184374 – guiverc Dec 30 '20 at 22:32
  • Thanks this fully explains the issue. Now I'll check the given resources to see how to make chromium download in the "true" /tmp, if at all possible. – Emmanuel Dec 31 '20 at 10:03
  • The snap confinement model is selected at build time but the builder (https://snapcraft.io/docs/snap-confinement) and I don't believe you'll be able to change anything about chromium because it's not built to be classic confinement snap (that would not be wise security-wise for a web browser, but would have provided full access to your real file-system). Builds of snaps and /tmp have had issues (see https://forum.snapcraft.io/t/temporarydirectory-and-how-to-manage-access-to-tmp/10176) but that's for developers (and won't be useful to you) – guiverc Dec 31 '20 at 10:15
  • I use chromium (as evidenced by my partial snap listcommand; on my hirsute system) and a lsof |grep chromium |grep tmp does show some results (ie. list open files.. show chromium .. show only tmp`).. maybe you'll find files there of use, but I very much doubt it... – guiverc Dec 31 '20 at 10:17
  • Thanks @guiverc for the additional information – Emmanuel Dec 31 '20 at 16:25