Bug 429608 - Printing, saving, and preview of pdf file fails
Summary: Printing, saving, and preview of pdf file fails
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: printing (show other bugs)
Version: 1.9.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-24 22:09 UTC by Jens Breitenbach
Modified: 2020-11-25 22:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Breitenbach 2020-11-24 22:09:16 UTC
SUMMARY
I try to print a pdf file from okular, but nothing happens. When starting okular from the command line some weird behaviour occurs (did not happen under Kubuntu 18.04)

STEPS TO REPRODUCE
1. run konsole and type okular mypdf.pdf
2. select "print preview". You get the following error message printed in konsole window: notify_add_watch(/tmp/okular_xkGczc.ps) failed: (Permission denied)
3. select "print" from the menu. konsole output shows error message (translated from German): /usr/bin/lpr: Error - No access to "/tmp/okular_FfOYzt.ps" - permission denied
4. When trying to save the opened file the error message appears in a window in okular, saying the file cannot be saved to /tmp/okular_whatever, even if I specify a file name in my home directory.
5. listing directory /tmp shows 
$ls -l /tmp
...
---------- 1 user user 485826 Nov 24 22:55 okular_FfOYzt.ps
...
The file in question cannot be accessed since it has chmod 000.

OBSERVED RESULT
Cannot print

EXPECTED RESULT
Can print

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.04 
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2020-11-24 23:12:37 UTC
is your /tmp misconfigured?
Comment 2 Jens Breitenbach 2020-11-24 23:32:03 UTC
(In reply to Albert Astals Cid from comment #1)
> is your /tmp misconfigured?

its settings in ls -l are:
drwxrwxrwt  24 root root   61440 Nov 25 00:30 tmp
Comment 3 Jens Breitenbach 2020-11-25 21:17:43 UTC
Three additions:
1. It works fine on a different PC also running under Kubuntu 20.04, same program versions (upgraded from 18.04 LTS two weeks earlier)
2. Printing works when starting okular with root privileges.
3. Printing also works when I force rasterization.
Comment 4 Albert Astals Cid 2020-11-25 22:14:53 UTC
The fact that it works in another PC with the same software just goes to show this is a mis-setup of the PC that doesn't work, not much we can do to fix that.