[Pkg-cups-devel] Bug#501719: cups-pdf: doesn't play well with NetWare shares

Volker Behr behr at physik.uni-wuerzburg.de
Fri Oct 17 14:22:05 UTC 2008


At a first glance it looks like GhostScript is failing (return code
256). Since it is working for root, it might be an issue with file
permissions on the Netware volume. Is the user 'irlab' allowed to write
to /mnt/Novell/PROD/PDF-Printer? Does the test.pdf already exist? If so,
is 'irlab' allowed to overwrite it?

On Thu, 2008-10-09 at 22:08 +0200, Luca Capello wrote:
> Package: cups-pdf
> Version: 2.4.8-3
> Severity: important
> 
> Hi there!
> 
> Note1: I set Severity: important because I cannot find any reference
>        about this particular problem in the CUPS-PDF documentation nor
>        on the net, feel free to downgrade it at most to normal.
> 
> Note2: this can be similar to bug #496317 [1], but the origins are
>        different, that's why I submitted a new bug.
> 
> Note3: AFAIK ncp doesn't offer a 'root_squash' option.
> 
> I setup a print server for Windows/OSX machines for the laboratory
> where I work and it's working pretty well.  Instead of installing one of
> the free (as in beer) virtual PDF printers for Windows, I decided to
> offer a different free (as in speech) solution thanks to CUPS-PDF.
> 
> A bit more about my laboratory setup: we don't use user logins, but only
> one for everyone and on every computer.  Since our university offers
> NetWare shares (incrementally backup-ed), all of our documents are
> stored on one unique NetWare volume.
> 
> My idea is simple: from their Windows/OSX machines colleagues print to
> the shared CUPD-PDF printer, which saves the PDF file in one specific
> folder on the NetWare volume.  However, this doesn't work and there's no
> useful error shown by CUPS-PDF :-(
> 
> The print server setup:
> 
> - irlab/PDF is a symlink to /mnt/Novell/PDF-Printer
> 
> - the NetWare share is mounted with ncp options
>     noatime,rw,exec,auto,multiple,gid=plugdev,mode=775
> 
> - /mnt/Novell, when the NetWare share is not mounted, has permissions
>   775 and is owned by root:plugdev
> 
> - irlab is in the plugdev group
> 
> With the setup above, even when printing from command line through lpr,
> the situations is the following, with logging at level 7:
> 
> a) irlab cannot print
> =====
> [DEBUG] switching to new gid (lpadmin)
> [DEBUG] initialization finished (v2.4.8)
> [DEBUG] user identified (irlab)
> [DEBUG] output directory name generated (/mnt/Novell/PROD/PDF-Printer)
> [DEBUG] user information prepared
> [DEBUG] spoolfile name created (/var/spool/cups-pdf/SPOOL/cups2pdf-4115)
> [DEBUG] source stream ready
> [DEBUG] destination stream ready (/var/spool/cups-pdf/SPOOL/cups2pdf-4115)
> [DEBUG] owner set for spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-4115)
> [DEBUG] found beginning of postscript code (%!PS-Adobe-3.0)
> [DEBUG] now extracting postscript code
> [DEBUG] found title in ps code ((test.txt))
> [DEBUG] found embedded (e)ps code (%!PS-AdobeFont-1.0: Courier-Bold 1.05)
> [DEBUG] found embedded (e)ps code (%!PS-AdobeFont-1.0: Courier 1.05)
> [DEBUG] found embedded (e)ps code (%!PS-AdobeFont-1.0: Symbol 001.005)
> [DEBUG] found end of embedded (e)ps code (%%EOF)
> [DEBUG] all data written to spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-4115)
> [DEBUG] trying to use PS title ((test.txt))
> [DEBUG] removing trailing newlines from title ((test.txt))
> [DEBUG] removing enclosing parentheses () from full title ((test.txt))
> [DEBUG] removing file name extension (.txt)
> [DEBUG] removing special characters from title (test)
> [DEBUG] title successfully retrieved (test)
> [DEBUG] input data read from stdin
> [DEBUG] output filename created (/mnt/Novell/PROD/PDF-Printer/test.pdf)
> [DEBUG] ghostscript commandline built (/usr/bin/gs -q -dCompatibilityLevel=1.4 \
>          -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite \
>          -sOutputFile="/mnt/Novell/PROD/PDF-Printer/test.pdf" \
>          -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false \
>          -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress \
>          -c .setpdfwrite -f /var/spool/cups-pdf/SPOOL/cups2pdf-4115)
> [DEBUG] output file unlinked (/mnt/Novell/PROD/PDF-Printer/test.pdf)
> [DEBUG] TMPDIR set for GhostScript (/var/tmp)
> [DEBUG] entering child process
> [DEBUG] GID set for current user
> [DEBUG] UID set for current user (irlab)
> [DEBUG] ghostscript has finished (256)
> [ERROR] failed to set file mode for PDF file (non fatal) (/mnt/Novell/PROD/PDF-Printer/test.pdf)
> [DEBUG] ERRNO: 2
> [DEBUG] waiting for child to exit
> [DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-4115)
> [DEBUG] all memory has been freed
> [STATUS] PDF creation successfully finished (irlab)
> =====
> 
>    The only error I get seems to be non fatal, which according to [2],
>    is not true: if this kind of error is fatal, why the '(non fatal)'
>    statement?  And if Ghostscript exits with an error (256), why isn't
>    this marked as so by CUPS-PDF?
> 
>    FWIW, so far I've failed to mount the NetWare share with file/mode
>    permission features and I've tested all the ncp options.  However,
>    this hasn't caused any other problem until now.
> 
>    FYI, irlab can write to both /mnt/Novell/PROD/PDF-Printer/ and
>    /var/tmp.
> 
> b) anonymous (e.g. the "Print Test Page" from http://localhost:631)
>    cannot print either (the CUPS-PDF log is the same)
> 
> c) root can print without any problem
> =====
> [...]
> [DEBUG] output file unlinked (/mnt/Novell/PROD/PDF-Printer/test.pdf)
> [DEBUG] TMPDIR set for GhostScript (/var/tmp)
> [DEBUG] entering child process
> [DEBUG] GID set for current user
> [DEBUG] UID set for current user (root)
> [DEBUG] ghostscript has finished (0)
> [DEBUG] file mode set for user output (/mnt/Novell/PROD/PDF-Printer/test.pdf)
> [DEBUG] no postprocessing
> [DEBUG] waiting for child to exit
> [DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-4157)
> [DEBUG] all memory has been freed
> [STATUS] PDF creation successfully finished (root)
> =====
> 
> I still wonder what's wrong with my setup :-(
> 
> Thx, bye,
> Gismo / Luca
> 
> Footnotes: 
> [1] http://bugs.debian.org/496317
> [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496317#17
> 
> -- System Information:
> Debian Release: lenny/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: i386 (i686)
> 
> Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
> 
> Versions of packages cups-pdf depends on:
> ii  cups                     1.3.8-1lenny1   Common UNIX Printing System(tm) - 
> ii  cups-client              1.3.8-1lenny1   Common UNIX Printing System(tm) - 
> ii  ghostscript              8.62.dfsg.1-3.1 The GPL Ghostscript PostScript/PDF
> ii  libc6                    2.7-13          GNU C Library: Shared libraries
> ii  libpaper-utils           1.1.23+nmu1     library for handling paper charact
> 
> cups-pdf recommends no packages.
> 
> Versions of packages cups-pdf suggests:
> pn  system-config-printer-gnome | <none>     (no description available)
-- 

Dr. rer. nat. Volker Christian Behr
Experimentelle Physik V (Biophysik), Physikalisches Institut
Universitaet Wuerzburg, Am Hubland, 97074 Wuerzburg, Germany

Office: Room F-069a
+49-931-888-5766 (phone)
+49-931-888-5851 (fax)






More information about the Pkg-cups-devel mailing list