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

Luca Capello luca at pca.it
Thu Oct 9 20:08:15 UTC 2008


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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20081009/8eed29bd/attachment.pgp 


More information about the Pkg-cups-devel mailing list