On Fri, Apr 11, 2025 at 8:28 AM Greg Wooledge <g...@wooledge.org> wrote: > > On Fri, Apr 11, 2025 at 14:16:17 +0200, Christoph Pleger wrote: > > 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. > > Check the permissions of /tmp on both systems? ls -ld /tmp > > It's the first thing that comes to mind, even though I can't think of > a specific misconfiguration that would cause a temp file to have > the wrong owner. > > If it's not obvious from the ls -ld output, then look at the mount > options and file system type. If you've done something extremely > unusual like mounting a VFAT file system as /tmp, well, that might > do it too.
SELinux also comes to mind, even though Debian does not enable it by default. SELinux will hijack POSIX error codes and return values, so an EPERM may be coming from SELinux instead of a POSIX API call. It is very frustrating to troubleshoot since you can read the POSIX docs and wonder how a return value appeared given the POSIX permissions were Ok. Jeff