News: 0001471880

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Systemd 256.1 Fixes "systemd-tmpfiles" Unexpectedly Deleting Your /home Directory

([systemd] 6 Hours Ago systemd-tmpfiles --purge)


For those running the command "systemd-tmpfiles --purge" and think that this command just deletes your temporary files, think again and watch out. In reality it will delete all files and directories created by a tmpfiles.d entry... Including the /home that is created by systemd-tmpfiles' home.conf. With users being bitten in recent days by this behavior when they were just expecting tmp files to be removed, systemd 256.1 is now available and does have a change to avoid inadvertently deleting your all-important home directory.

Over on [1]Mastodon and a [2]systemd bug report , users were surprised that running "systemd-tmpfiles --purge" will delete all files/folders created by a tmpfiles.d configuration file even with the default behavior of /home being created by one. Thus those trying to do system maintenance without reading the man page could find their /home data deleted.

Initially the bug report was shot down by systemd developer Luca Boccassi of Microsoft with:

So an option that is literally documented as saying "all files and directories created by a tmpfiles.d/ entry will be deleted", that you knew nothing about, sounded like a "good idea"? Did you even go and look what tmpfiles.d entries you had beforehand?

Maybe don't just run random commands that you know nothing about, while ignoring what the documentation tells you? Just a thought eh

Ultimately though after much discussion the past few days, systemd-tmpfiles behavior is now improved upon. Merged yesterday was [3]this patch that now makes systemd-tmpfiles accept a configuration file when running purge. That way the user must knowingly supply the configuration file(s) to which files they would ultimately like removed. The documentation has also been improved upon to make the behavior more clear.

That patch made it into yesterday's [4]systemd 256.1 point release.



[1] https://mathstodon.xyz/@bremner/112615591101488528

[2] https://github.com/systemd/systemd/issues/33349

[3] https://github.com/systemd/systemd/commit/e76015738942246db70f444b3567afd1b132f824

[4] https://github.com/systemd/systemd/releases/tag/v256.1



davidbepo

dragon321

uxmkt

user1

davidbepo

usta

Volta

npwx

toves

Play Rogue, visit exotic locations, meet strange creatures and kill them.