[Pkg-cups-devel] Bug#501719: cups-pdf: doesn't play well with NetWare shares
Luca Capello
luca at pca.it
Fri Oct 17 19:45:05 UTC 2008
Hi Volker!
Please don't top post: http://en.wikipedia.org/wiki/Top_posting
On Fri, 17 Oct 2008 16:22:05 +0200, Volker Behr wrote:
> At a first glance it looks like GhostScript is failing (return code
> 256).
This was already in my original post:
> On Thu, 2008-10-09 at 22:08 +0200, Luca Capello wrote:
>> 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?
The question remains: why CUPS-PDF doesn't get it as an error? The same
error happens with the default settings, i.e. "Out ${HOME}/PDF" in
/etc/cups/cups-pdf.conf, and when /home/irlab/PDF already exists and is
a symlink to /mnt/Novell/PROD/PDF-Printer.
> 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?
This was already present in my original post, maybe it wasn't clear:
>> 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
Thus, yes, the 'irlab' user can write to the Netware volume.
However, I performed more tests and I found the *real* error.
If the output directory doesn't exists, CUPS-PDF fails with an error:
=====
[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)
[STATUS] directory created (/mnt/Novell/PROD/PDF-Printer)
[DEBUG] user output directory created (/mnt/Novell/PROD/PDF-Printer)
[ERROR] failed to set owner for output directory (irlab)
=====
Indeed, ncpmount still doesn't support `chown`:
=====
irlab at r-abraham:~$ cat test.txt
This is a test
irlab at r-abraham:~$ ls -l test.txt
-rwxrwxr-x 1 irlab irlab 15 2008-10-17 20:30 test.txt
irlab at r-abraham:~$ cp test.txt /mnt/Novell/PROD/ && echo OK
OK
irlab at r-abraham:~$ mv test.txt /mnt/Novell/PROD/ && echo OK
mv: preserving times for `/mnt/Novell/PROD/test.txt': Operation not permitted
mv: setting permissions for `/mnt/Novell/PROD/test.txt': Operation not permitted
OK
irlab at r-abraham:~$ chown irlab:irlab /mnt/Novell/PROD/ && echo OK
chown: changing ownership of `/mnt/Novell/PROD/': Operation not permitted
irlab at r-abraham:~$
=====
If I set 'irlab' as *both* uid and gid for the NetWare mount (`man
ncpmount` [1]), CUPS-PDF works as expected. Setting only one of the two
still results in the chown error. FYI, the error is present even when
setting "UserUMask 0000" in /etc/cups/cups-pdf.conf.
While this seems not to be a bug in CUPS-PDF (please feel free to
reassign it to ncpfs [2]), however CUPS-PDF should report a more
informative error.
Thx, bye,
Gismo / Luca
Footnotes:
[1] http://manpages.debian.net/cgi-bin/man.cgi?query=ncpmount
[2] I'm quite sure there's no way for ncpmount to support chown, at
least from how I read `man ncpmount` [1], but maybe I'm fault
-------------- 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/20081017/b5380763/attachment.pgp
More information about the Pkg-cups-devel
mailing list