[snap] can't access files open from the archive manager in .cache

Bug #2052686 reported by Francois Thirioux
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
New
Low
Unassigned

Bug Description

Hi,

1) receive an email with a ZIP attachment
2) open this archive with usual archive manager
3) open a file from this archive window
4) forbidden (probably by confinement)

So, it could be really nice we could open such archived files in a usual and natural way, like in TB deb version.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The steps you describe work correctly for me, could you provide some extra details?

1. In which application is the .zip getting open? (for me it's file-roller but that might depends of you desktop environment / default applications)

2. Which type of file do you try to open in the archive and using what software? (I tried to open a text in gedit)

3. if you do
$ journalctl -f

then try to open the file in the archive, is there anything printed in the log?

Changed in thunderbird (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Francois Thirioux (fthx) wrote :

Ok. First at all sorry: I was thinking about Firefox, that shows the same issue!
But I can reproduce in TB too (so the issue is not directly FF or TB-related?).

1) make two ODT files
2) compress them to ZIP
3) send yourself an email with ZIP as attachment
4) open this ZIP with file roller
5) double click on one of the both files (open with LibreOffice)
6) audit: type=1400 audit(1707394260.979:341): apparmor="DENIED" operation="open" class="file" profile="snap.libreoffice.writer" name=2F68...474 pid=7299 comm="soffice.bin" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=1000

I do use Noble with TB snap 115.7 in GNOME Shell.

Revision history for this message
Sebastien Bacher (seb128) wrote :

if in file-roller you use the top-right menu and pick 'save as' in which directory does it want to store the archive for you? (should give an hint of what location it's trying to access)

Revision history for this message
Francois Thirioux (fthx) wrote :

that's in ~/Downloads/thunderbird.tmp/pid-6034
(thunderbird-bin pid is 6034 I checked that, to be sure...)

Revision history for this message
Francois Thirioux (fthx) wrote :

in Firefox that's in ~/.cache/

Revision history for this message
Francois Thirioux (fthx) wrote :

in TB too, if I double-click on an extracted file in file-roller, I get:
~/.cache/.fr-XXXXXX/my_file.odt

Revision history for this message
Francois Thirioux (fthx) wrote :

~/Downloads/thunderbird.tmp/pid-6034
is the location of the ZIP archive

Revision history for this message
Sebastien Bacher (seb128) wrote :

Are you using libreoffice as a snap? Confined snaps are prevented by default to access .directories so it would explain why libreoffice fails to open the file from ~/.cache (and why it would work here using gedit as a deb)

Revision history for this message
Francois Thirioux (fthx) wrote :

yep, LO as snap too

Revision history for this message
Sebastien Bacher (seb128) wrote :

Ok, so the issue isn't a Thunderbird one I think. Could you try if opening the same .zip directly from the filemanager and then trying to open the document gives the same error?

Revision history for this message
Francois Thirioux (fthx) wrote :

Same error.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, it's similar to bug #2020220. I'm going to reassign to the libreoffice snap for now though it's not really a 'bug' there.

The choice of file-roller to use ~/.cache to unpack files is also unfortunate, maybe we should patch it to use another location.

The issue might also get fixed once we get apparmor prompting (then the desktop would ask you if you want to give libreoffice access to the file or directory)

affects: thunderbird (Ubuntu) → libreoffice (Ubuntu)
Changed in libreoffice (Ubuntu):
status: Incomplete → New
summary: - [snap] Access to archive files is forbidden
+ [snap] can't access files open from the archive manager in .cache
Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream discussion in file-roller about potential using another temporary directory (for different reasons but it could help with the snap problem), https://gitlab.gnome.org/GNOME/file-roller/-/issues/191

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.