Hello,

I have a strange problem with CUPS and hope that someone can help me
with the solution.

"Strange", in this case, means that I have two machines, both running
Debian 12 and the corresponding versions of cups and cups-browsed.
On one of these machines, I can print as any user, while on the other
computer it works only as root. In both cases, printing is to take
place on a remote printer whose information is received via IPP
broadcast from cups-browsed. 

I have edited the source code of cups a little to get a some more
more detailed information about the problem (the actual code
only gives a meaningless message “The print file cannot be opened:
Permission denied") and then found out the following:

The “print file” is a temporary file in /tmp, has the UID 0 and
the GID 7 (belongs to the system user lp) and the access rights 600, so
it can only be written or read by root. The process that
tries to access the file has the somewhat strange name
ipp://$RemoteHost:$RemotePort/printers/$Printer .

The decisive difference between the two computers is:

On the computer where printing works as expected, the
process with the strange name is executed under the effective UID 0,
while on the other computer, the effective UID is the UID of the user
who wants to print something. In the latter case, the “print file”,
which can only be accessed by root, can of course not be opened.

Does anyone have an idea why the strangely named process runs with root
rights on one machine, but not on the other?

Greetings
  Christoph

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to