Comment on Strange cAdvisor Issue
speculate7383@lemmy.today 2 days agoWhy wouldn’t changing to permissions keep the file from being deleted by the internal process?
That’s like keeping your lunch laying outside on the sidewalk, getting stepped on by people and destroyed, and then wondering if your lunch would be safer if you put it in a stronger bag (but still left it on the sidewalk).
Don’t leave your lunch outside laying on the sidewalk, regardless of what you might do to “protect” it. Don’t keep important files in /tmp
irmadlad@lemmy.world 2 days ago
I get that. It would seem tho, you could make the file immutable with
sudo chattr +i /tmp/cadvisor/prometheus.yml
speculate7383@lemmy.today 2 days ago
Yes, many bad ideas are possible to implement. At least temporarily. Until the next cleanup process figures out how to remove cadvisor dir regardless of file contents. Or the next OS release turns /tmp into a ram disk. Or… or… or…
Yes, it’s a fun academic exercise to think through possible mitigations. And in the end, it will still be dumb to keep this in /tmp
irmadlad@lemmy.world 2 days ago
I was asking in the generic sense, not directly related to the above issue, but thank you.