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

Tue Oct 3 17:32:45 UTC 2017
Johnny Hughes <johnny at centos.org>

On 10/03/2017 12:04 PM, hw wrote:
> marcos valentine <msr.mailing at gmail.com> writes:
>> You can try chattr?
>> https://en.wikipedia.org/wiki/Chattr
> Wow, I never needed/used that.  Being able to make files undeletable
> might be a very useful thing ...

as others have mentioned, that will not WORK in this case.

The issue here is that /var/run is a tmpfs mount.  That means it is
NEVER going to survive a reboot.  It is a filesystem created in RAM at
boot time.

The design of /var/run on CentOS never needs to carry over files after a
reboot .. the purpose of /var/run is to hold the PID of a process that
starts at boot .. therefore, when you restart, there will be nothing in
there as everything is restarting.

The real question here is, what non centos thing are you trying to do
where you need to redesign the init system.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20171003/c152d285/attachment-0005.sig>