Re: /var/run/... being deleted :((

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



On Sep 21, 2017, at 8:14 AM, hw <hw@xxxxxxxx> wrote:
> what keeps deleting files and directories under /var/run?  Having them deleted
> is extremely annoying because after a reboot, things are suddenly broken because
> services don´t start.

Assuming that this is a CentOS 7 system, /var/run is just a link to /run, which is a tmpfs filesystem.  No files there survive a reboot.m

If you need directories to be automatically created, you’ll need to use systemd-tmpfiles.  Basically, the packages put files in /usr/lib/tmpfiles.d/, and you’d add your own in /etc/tmpfiles.d/.  

For example, fail2ban has:

$ cat /usr/lib/tmpfiles.d/fail2ban.conf
D /var/run/fail2ban 0755 root root -

Read the ‘tmpfiles.d’ man page for more details.

--
Jonathan Billings <billings@xxxxxxxxxx>


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux