OpenPrinting / OpenPrinting/cups-browsed

Printing fails with "Unable to open print file"

Open
#53 5 comments 0 reactions 1 assignee View on GitHub

@michaelrsweet is already working on this.

Since May 7, 2025.

Dominant language
C
Stars
49
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have a number of machines where printing failed with error "Unable to open print file". As this error message is not especially meaningful, I edited the cups source code (backend/ipp.c) so that additionally the full path of the print file, the name of the process trying to open the print file and the effective UID and GID of that process were given.

So, I found that the print file was a temporary file in /tmp, belonging to user root and group lp, but only readable by root; that the process is named in the scheme (all printers are imported from remote by cups-browsed)

ipp://$RemoteHost:$RemotePort/printers/$Printer

which was running with effective UID of the user trying to print and effective GID lp.

Of. course, the print file could not be opened with these permissions.

But I had another machine where printing worked, with almost the same configuration, and found that there, the process named ipp://$RemoteHost:$RemotePort/printers/$Printer was running with effective UID 0.

So, I deinstalled and then reinstalled all cups packages, deleted all cups-related caches and spools I could find, and somehow after some tests I thought that the problem was solved, but now I have the same again: process with effective UID != 0 trying to open file exclusively accessible by root cannot open the file.

What can I do?

CUPS 2.4.2

Regards
Christoph

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.