Permission Denied error when reading a pdf format file whos name doesn't end in .pdf

Bug #867749 reported by Erik B. Andersen on 2011-10-04
This bug affects 4 people
Affects Status Importance Assigned to Milestone
evince (Ubuntu)

Bug Description

When opening a pdf document that has a name ending in '.pdf' the document opens as expected. However, when opening a pdf document whose name does not end in '.pdf',, evince gives the error "Permission Denied".

To Reproduce:
0. Obtain a PDF document.
1. Make a copy of it.
2. Rename the copy so that the name does not end in '.pdf'.
3. Open the original copy. Notice that there is no error.
4. Open the renamed copy and notice that the document is not opened and instead the error "Permission Denied" is given.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: evince 2.32.0-0ubuntu12.3
ProcVersionSignature: Ubuntu 2.6.38-11.50-generic
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
CheckboxSubmission: a869e808e24f1cd12a0b9ddfb6a9e84b
CheckboxSystem: fd6c484c0b5d20a2f1cd036ef0f63975
Date: Tue Oct 4 10:48:51 2011
ExecutablePath: /usr/bin/evince
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcCmdline_: BOOT_IMAGE=/boot/vmlinuz-2.6.38-11-generic root=UUID=b3cdc2b9-ea16-4287-aac5-8583c21f4050 ro quiet splash vt.handoff=7
 PATH=(custom, user)
ProcVersionSignature_: Ubuntu 2.6.38-11.50-generic
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)

Erik B. Andersen (azendale) wrote :
Changed in evince (Ubuntu):
importance: Undecided → Low
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in evince (Ubuntu):
status: New → Confirmed
Germán Poo-Caamaño (gpoo) wrote :

In Evince upstream, we have seen similar reports in the past, but all of them have turned out to be Ubuntu specific (i.e. issues with apparmor).

As per comment

File named test:

[12219.529055] type=1400 audit(1420318053.543:106): apparmor="DENIED"
operation="open" profile="/usr/bin/evince" name="/var/run/test" pid=22519
comm="EvJobScheduler" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

After renaming to test.pdf it works as expected.

This does not apply if file is in user home dir. Looks to me like distro
(namely Ubuntu) specific.

Changed in evince:
importance: Unknown → Medium
status: Unknown → In Progress
Stéphane V (svergeylen) wrote :

This also affect Ubuntu 14.04 LTS with evince 3.10.3.

Workaround :

Modify the Apparmor security profile with these two commands :

        sudo apt-get install apparmor-utils
        sudo aa-complain /usr/bin/evince

and it should be working....

Changed in evince:
status: In Progress → Expired
jay armstrong (jayarmstrong) wrote :

This continues in Ubuntu 18.10 and dmesg indicates it's Apparmor's fault.

I'm confused as to where I should follow up though.

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

Other bug subscribers

Remote bug watches

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