• Printing Problem with CUPS

    From Christoph Pleger@21:1/5 to All on Fri Apr 11 14:20:01 2025
    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

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEHeqYcooFjlnR4zwFcOXIip7d3fEFAmf5B8sACgkQcOXIip7d 3fFDOxAAlsJEty/IHzyrAsxX0avI2DB6ggJataibeUtyIhmArYmhlCf5YwB+TfCT sEkcmPMarIqhGvmDryoWYwrrEuXtXMZOqgQITIGjk7LjWb2ZliDASztX2j08yta0 QQ7mpzk0wWYeZix3Hm3Jn3CjhQOqdsAkKi5MHCFitZFOk00ehhFetatV2BsYM71m dQFDttavp0DH42wGE8K7FhaGRAAIcN/5EG03HNBrXoeAZ20KJWGFNDZBwMMJvd4b Fg1+1+qC91ge8+HefNcxTcNKyPgUGQmhujGXmgBIBirYR4k247SYTKoRDPrKs1BY pASze7vtT+SXuJ331cSKjNoeaGfvWQi+T/2wPkPZkDtt/WHOUTjbu1W29F1pDhNz 51e/djua+ipZUbfbEZvNHTxXZd7c/NtSDXbbotYDePZieKPltWPNVyyLHAVyOgDA Q/nXSXqVgh1yvPn3m8n0u+XLdBewLF6Os8SRcOdBzsNmbEPsqI9d2MjaZm7nFAsu xA4jwUdlEKnRWIEu5jB3e/hh4meye/tQcOyLyDkZ4rR6pC/wIjZNyPmsFP2VEI7R CxY+aVYS/zaQWGzQ4RQAJqIb47eTpHV2n0yiMzpHChB2qDlZ7MokwlxXv1cFPWlC l+UJQWXVGT8oMEjDt/ps94TLu/QvHhEOTROd5ULHcmS9IJIpH9E=
    =14FW
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)