[apparmor] Evince does not save files to external disks unless I rename them with the .pdf extension

Bug #1096837 reported by riderplus
78
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Evince
Unknown
Medium
evince (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I open a pdf document from springerlink. It has the name "0012132432" (no pdf
extension). If I try and "Save a copy" of the file with the exact same name
into my $HOME folder, there is no problem, the file is saved with that name. If
I try and "Save a copy" of the file with the exact same name into my
/media/Disk directory (i.e. where /dev/sda6 was mounted) or some other disk
apart from the mountpoint of $HOME, it doesn't save it, UNLESS I rename the
file and place the .pdf extension like this: "0012132432.pdf". Then it saves it
without any problem. I had this issue with Evince 3.6.1, now in Evince 3.7.1
the annoying bug persists. Please note that there is no permission problem: I
can easily transfer files from $HOME to /media/Disk and vice versa, without any
requirement for root password. It's clearly a bug in Evince, please fix it, it
actually scared the guys on the #linux IRC channel, irc.freenode.org, due to
its dumbness.

I have tried deactivating apparmor...it was of no avail, the error still shows up.
I also reported this bug here: https://bugzilla.gnome.org/process_bug.cgi

Tags: apparmor

Related branches

Sam_ (and-sam)
affects: ubuntu → evince (Ubuntu)
Changed in evince:
importance: Unknown → Critical
status: Unknown → Incomplete
Changed in evince:
importance: Critical → Medium
status: Incomplete → Confirmed
Revision history for this message
riderplus (entropy) wrote :

Bug fixed. Please check the assignee.

Changed in evince (Ubuntu):
importance: Undecided → Low
status: New → Triaged
tags: added: apparmor
summary: - Evince does not save files unless I rename them with the .pdf extension
+ [apparmor] Evince does not save files to external disks unless I rename
+ them with the .pdf extension
Changed in evince:
status: Confirmed → Unknown
Revision history for this message
Klaus Bielke (k-bielke) wrote :

I can confirm this bug, see #1327161.

Even worse, it affects also opening a file without a tailing '.pdf' on a drive mounted under /media/…

This bug exist for a long time. I see it under Ubuntu 10.04 LTS (evince 2.30.3-0ubuntu1.3, under Ubuntu 12.04 LTS (evince 3.4.0-0ubuntu1.7 and under 14.04 LTS (evince 3.10.3-0ubuntu10).

Revision history for this message
Klaus Bielke (k-bielke) wrote :

This is not an issue of the evince program, but the apparmor rules for evince.

Checking by trying this procedure on Ubuntu 10.04, 12.04 or 14.04:
Be carefull, these modifications will be permanent and survive reboot!

1. Install apparmor-utils.
2. In a terminal check apparmor status with this command: sudo aa-status
evince should be in enforce mode.
3. Set evince to complain mode in apparmor with this command: sudo aa-complain evince
4. Try opening a PDF without tailing '.pdf' on a filesystem mounted under /media/… It should proceed without error. You can also save a file from evince without '.pdf' now on an external media.
5. You can undo with this command: sudo aa-enforce evince

I do not recommend using step 3 as a workaround for this bug. It is a hint that evince need its apparmor rules to be improved. I will file a separate bug against package evince-common, which contains a profile for apparmor.

Changed in evince (Ubuntu):
status: Triaged → In Progress
Revision history for this message
florin (florin-arjocu) wrote :

Evince crashes each time I have a look at large photo folders on /media/.. It is not fun at all :(

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package evince - 3.10.3-0ubuntu15

---------------
evince (3.10.3-0ubuntu15) utopic; urgency=medium

  * debian/apparmor-profile:
    - allow site-wide dconf. Thanks to Lars Masden. (LP: #1355804)
    - allow read/write to files we own in /media (LP: #1096837)
    - allow read/write to files we own in /run/user/1000/at-spi2-*
      (LP: #1308488)
    - allow 'l' to /run/user/*/gvfs-metadata/** (LP: #1344810)
    - allow read/write of @{HOME}/.cache/dconf/user (LP: #1024605)
  * debian/apparmor-profile.abstraction:
    - allow read of /etc/xdg/lubuntu/applications/defaults.list (LP: #1290157,
      LP: #1299239)
    - allow read of /**.[eE][pP][sS][fFiI23] (LP: #1330430)
 -- Jamie Strandboge <email address hidden> Tue, 12 Aug 2014 14:30:43 -0500

Changed in evince (Ubuntu):
status: In Progress → Fix Released
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.