[CentOS] systemd private tmp dirs

Thu Apr 16 02:15:29 UTC 2015
Les Mikesell <lesmikesell at gmail.com>

On Wed, Apr 15, 2015 at 9:00 PM, John R Pierce <pierce at hogranch.com> wrote:
> On 4/15/2015 6:52 PM, Les Mikesell wrote:
>>
>> Mostly I'm interested in avoiding surprises and having code that isn't
>> married to the weirdness of any particular version of any particular
>> distribution.  And I found this to be pretty surprising, given that I
>> could see the file in /tmp and could read the code that was looking
>> there.   So, from the point of view of writing portable code, how
>> should something handle this to run on any unix-like system?
>
>
> you sure this had nothing to do with selinux not letting perl running as the
> http user write there?
>

No, systemd actually remaps /tmp from apache - and apparently most
other daemons - to private directories  below /tmp with configs as
shipped.  The command line tool wrote the file to /tmp as expected.
The perl code running under httpd reading what it thought was /tmp was
actually looking under /tmp/systemd-private-something.  I'm beginning
to see why so much of EPEL isn't included in epel7 yet.

-- 
   Les Mikesell
    lesmikesell at gmail.com