[CentOS] how to prevent files and directories from being deleted?

Tue Oct 3 17:12:40 UTC 2017
hw <hw at adminart.net>

Alexander Dalloz <ad+lists at uni-x.org> writes:

> Am 01.10.2017 um 17:21 schrieb hw:
>> Hi,
>> how can I prevent files/directories like /var/run/mariadb from being
>> deleted on reboot?  Lighttpd has the same problem.
>> This breaks services and makes servers non-restartable by anyone else
>> but the administrator who needs to re-create the needed files and
>> directories every time and has to figure out what selinux labels they
>> need.  This causes unnecessary downtimes.
>> This is entirely inacceptable.  This totally sucks.
> See
> https://developers.redhat.com/blog/2016/09/20/managing-temporary-files-with-systemd-tmpfiles-on-rhel7/
> how to manage tmpfiles.

Thanks, I´ll look into that.  I wouldn´t consider a directory like
/var/run/mariadb in any way as only temporary --- and wouldn´t consider
directories that are required for the system to work as temporary,

> Curious, how did you install MariaDB that you have such a problem? The
> package shipping with CentOS does not create such issue.

I´m using the packages from mariadb.org.  The old version that comes in
Centos isn´t recommended, and I need features only the newer versions

Lighttpd is from epel, and it has basically the same issue.

"Didn't work" is an error.