cups-pdf not creating any output if changing output directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups-pdf (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Leaving all default settings cups-pdf works as expected. Changing output directory to "${HOME}
Setting LogLevel to 7 (debug) shows, the commandline for ghostscript is perfect, but after the file is created it is unlinked. Thus the user will never have access to the file as long as he/she isn't fast enough to access it between creation, before unlink:
Fri Oct 21 02:11:21 2011 [DEBUG] switching to new gid (lpadmin)
Fri Oct 21 02:11:21 2011 [DEBUG] initialization finished (v2.5.1)
Fri Oct 21 02:11:21 2011 [DEBUG] user identified (tps)
Fri Oct 21 02:11:21 2011 [DEBUG] output directory name generated (/home/
Fri Oct 21 02:11:21 2011 [DEBUG] user information prepared
Fri Oct 21 02:11:21 2011 [DEBUG] spoolfile name created (/var/spool/
Fri Oct 21 02:11:21 2011 [DEBUG] source stream ready
Fri Oct 21 02:11:21 2011 [DEBUG] destination stream ready (/var/spool/
Fri Oct 21 02:11:21 2011 [DEBUG] owner set for spoolfile (/var/spool/
Fri Oct 21 02:11:21 2011 [DEBUG] found beginning of postscript code (%!PS-Adobe-3.0)
Fri Oct 21 02:11:21 2011 [DEBUG] now extracting postscript code
Fri Oct 21 02:11:21 2011 [DEBUG] found title in ps code ((AW: "Grosser Methodikkurs" IBZ/ZTI, Zug))
Fri Oct 21 02:11:21 2011 [DEBUG] found end of postscript code (%%EOF)
Fri Oct 21 02:11:21 2011 [DEBUG] all data written to spoolfile (/var/spool/
Fri Oct 21 02:11:21 2011 [DEBUG] trying to use PS title ((AW: "Grosser Methodikkurs" IBZ/ZTI, Zug))
Fri Oct 21 02:11:21 2011 [DEBUG] removing trailing newlines from title ((AW: "Grosser Methodikkurs" IBZ/ZTI, Zug))
Fri Oct 21 02:11:21 2011 [DEBUG] removing enclosing parentheses () from full title ((AW: "Grosser Methodikkurs" IBZ/ZTI, Zug))
Fri Oct 21 02:11:21 2011 [DEBUG] removing slashes from full title (AW: "Grosser Methodikkurs" IBZ/ZTI, Zug)
Fri Oct 21 02:11:21 2011 [DEBUG] removing special characters from title (ZTI, Zug)
Fri Oct 21 02:11:21 2011 [DEBUG] title successfully retrieved (job_7-ZTI__Zug)
Fri Oct 21 02:11:21 2011 [DEBUG] input data read from stdin
Fri Oct 21 02:11:21 2011 [DEBUG] output filename created (/home/
Fri Oct 21 02:11:21 2011 [DEBUG] ghostscript commandline built (/usr/bin/gs -q -dCompatibility
Fri Oct 21 02:11:21 2011 [DEBUG] output file unlinked (/home/
Fri Oct 21 02:11:21 2011 [DEBUG] TMPDIR set for GhostScript (/var/tmp)
Fri Oct 21 02:11:21 2011 [DEBUG] waiting for child to exit
Fri Oct 21 02:11:21 2011 [DEBUG] entering child process
Fri Oct 21 02:11:21 2011 [DEBUG] GID set for current user
Fri Oct 21 02:11:21 2011 [DEBUG] supplementary groups set for current user
Fri Oct 21 02:11:21 2011 [DEBUG] UID set for current user (tps)
Fri Oct 21 02:11:21 2011 [DEBUG] ghostscript has finished (256)
Fri Oct 21 02:11:21 2011 [ERROR] failed to set file mode for PDF file (non fatal) (/home/
Fri Oct 21 02:11:21 2011 [DEBUG] ERRNO: 2
Fri Oct 21 02:11:21 2011 [DEBUG] no postprocessing
Fri Oct 21 02:11:21 2011 [DEBUG] spoolfile unlinked (/var/spool/
Fri Oct 21 02:11:21 2011 [DEBUG] all memory has been freed
Fri Oct 21 02:11:21 2011 [STATUS] PDF creation successfully finished (tps)
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cups-pdf 2.5.1-7
ProcVersionSign
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CupsErrorLog:
W [20/Oct/
W [20/Oct/
W [20/Oct/
Date: Fri Oct 21 02:15:17 2011
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
Lpstat: device for PDF: cups-pdf:/
Papersize: a4
PpdFiles: PDF: Generic CUPS-PDF Printer
ProcEnviron:
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: cups-pdf
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile.
That is actually caused by the AppArmor profile that ships with CUPS. It prevents changing the output directory without also altering the AppArmor profile, in addition to cups-pdf.conf options. This is already explained in /usr/share/ doc/cups- pdf/README. Debian