[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp
From: |
Jeffrey Walton |
Subject: |
Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp |
Date: |
Mon, 18 Jul 2022 09:46:21 -0400 |
On Mon, Jul 18, 2022 at 8:18 AM Edward Welbourne <edward.welbourne@qt.io> wrote:
>
> Alejandro Colomar (Monday, July 18, 2022 14:07)
> > MacOS seems to be setting TMPDIR (or at least some script run at
> > startup seems to be setting it in my system), and it's set to something
> > really weird that I don't trust will exist after reboot.
>
> Then I think the way you're using tmpdir doesn't match its usual
> semantics, namely that it's exactly a directory that's routinely blown
> away and recreated, at least as often as boot-time and ideally more
> often. If what you need is a place to store (even semi-) persistent
> state for a program, that should survive reboots, then you want
> $prefix/var/, not /tmp/ (which may well be a tmpfs partition, indeed).
I believe MacOS maps /etc and /tmp to a private area for the user.
They are not world readable/writable. I believe Apple did it for
hardening.
Here's from a MacOS X 10.5 machine I have:
$ ls -l /etc /tmp
lrwxr-xr-x@ 1 root wheel 11 Feb 10 2015 /etc -> private/etc
lrwxr-xr-x@ 1 root wheel 11 Feb 10 2015 /tmp -> private/tmp
Jeff