Files created by CUPS in "/tmp" aren't actually created in /tmp in RHEL 7

Solution Verified - Updated -

Issue

  • Consider the following two shell commands:

    ls -ls /tmp > /tmp/lperr
    echo 'test er2'  > /home/joe/lperr2
    

    both work in a simple two-line shell script. The first creates a file in /tmp and the second creates one in /home/joe. However, if I put the same two lines into a printer interface script, the line first creates a file in /tmp/system-private-ca1f.......-cups.service-9Uh8JK/tmp and the second one is created in /home/joe as expected. If I just execute the interface script from a command line they both work as expected. But if executed via an lp command the first one does its strange behavior.

  • If I configure a print queue with a DeviceURI like file:///tmp/output.txt, the file isn't saved in the /tmp directory.

  • Our print programs are not able to write out to /tmp. We upgraded the system from RHEL 5 to RHEL 7. The same commands that work on RHEL 5 to generate output in /tmp no longer work in RHEL 7.

Environment

  • Red Hat Enterprise Linux (RHEL) 7
  • Common Unix Printing System (CUPS) 1.6.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content