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.

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.