Permission error saving a file
Bug #1567565 reported by
Alex D
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
evince (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
On Ubuntu 15.10, using evince 3.16.1-0ubuntu1, I fill out a PDF form. When I save the form, I get the message "Error renaming temporary file: Permission denied", and the file is not saved. I don't have permissions trouble in any other apps.
The problem happens only when I'm using a filesystem that I mount in /mnt, and not for example in my home directory or in /tmp. Although I launch evince from the terminal, there are no unusual error messages printed there. However, journalctl shows a string of error messages (see attached log).
I found the cause of the bug and would like to propose a fix. The AppArmor profile for Evince contains a specific clause to handle saving files that looks like this:
# evince creates a temporary stream file like '.goutputstream -XXXXXX' in the eam-* w,
# directory a file is saved. This allows that behavior.
owner /**/.goutputstr
However, write permission is not sufficient to rename a file - the permission should be write AND read:
owner /**/.goutputstr eam-* rw,
Making this change has fixed the problem.