[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Files on /dev/shm/ disappear



Hello,

On Wed, Mar 02, 2022 at 07:54:53AM -0500, Greg Wooledge wrote:
> Someone who knows systemd, dbus, and all that stuff might be able to
> suggest next steps.

I'm not really that person but yes, logind removes things from
/dev/shm for a user if it's not a system user, when that user's
session ends. Which has caused even greater confusion than this,
before:

    https://github.com/systemd/systemd/issues/4532

In terms of avoiding this affecting OP, firstly normal users
probably shouldn't be using /dev/shm for routine storage. I would
suggest /tmp, /var/tmp or /run/user/$UID/.

If you don't like the cleaning up of /dev/shm then you can disable
it in /etc/systemd/logind.conf:

$ echo "RemoveIPC=no" | sudo tee -a /etc/systemd/logind.conf

(It's already in there with its commented out default of
RemoveIPC=yes)

and then reboot. Or maybe there is a way to restart logind without
rebooting everything. Or possibly it doesn't even need to be
restarted. I have not tested this bit.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: