marcos valentine
2017-Oct-02 12:36 UTC
[CentOS] how to prevent files and directories from being deleted?
You can try chattr? https://en.wikipedia.org/wiki/Chattr 2017-10-01 12:26 GMT-03:00 Alexander Dalloz <ad+lists at uni-x.org>:> 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-tempo > rary-files-with-systemd-tmpfiles-on-rhel7/ > > how to manage tmpfiles. > > Curious, how did you install MariaDB that you have such a problem? The > package shipping with CentOS does not create such issue. > > Alexander > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
John Hodrien
2017-Oct-02 13:10 UTC
[CentOS] how to prevent files and directories from being deleted?
On Mon, 2 Oct 2017, marcos valentine wrote:> You can try chattr? > > https://en.wikipedia.org/wiki/ChattrI think you'll find that'd do little useful on a tmpfs volume to preserve files across reboots. jh
hw
2017-Oct-03 17:04 UTC
[CentOS] how to prevent files and directories from being deleted?
marcos valentine <msr.mailing at gmail.com> writes:> You can try chattr? > > https://en.wikipedia.org/wiki/ChattrWow, I never needed/used that. Being able to make files undeletable might be a very useful thing ... -- "Didn't work" is an error.
Leroy Tennison
2017-Oct-03 17:22 UTC
[CentOS] how to prevent files and directories from being deleted?
chattr is a valuable but lesser-known tool, if you use it then document it somehow so other admins don't stumble over it. ----- Original Message ----- From: "hw" <hw at adminart.net> To: "centos" <centos at centos.org> Sent: Tuesday, October 3, 2017 12:04:14 PM Subject: Re: [CentOS] how to prevent files and directories from being deleted? marcos valentine <msr.mailing at gmail.com> writes:> You can try chattr? > > https://en.wikipedia.org/wiki/ChattrWow, I never needed/used that. Being able to make files undeletable might be a very useful thing ... -- "Didn't work" is an error. _______________________________________________ CentOS mailing list CentOS at centos.org https://lists.centos.org/mailman/listinfo/centos
Johnny Hughes
2017-Oct-03 17:32 UTC
[CentOS] how to prevent files and directories from being deleted?
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-0001.sig>
Apparently Analagous Threads
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?