Systemd users encountered an issue that led to the deletion of home directories.

A corrective release of the system manager systemd 256.1 has been published, which resolves an issue that led to the deletion of the contents of the /home directory when the command "systemd-tmpfiles —purge" was executed, introduced in systemd 256 to remove all files and directories created through settings in tmpfiles.d.

In the release notes for systemd 256 and in the man page for systemd-tmpfiles, it was stated that the option "—purge" removes all files and directories created through tmpfiles.d settings, but the name "tmpfiles" in the utility's title was misleading and gave the impression that the deletion was limited to temporary files.
However, the settings in tmpfiles.d are not limited to temporary files and are also used for automatically creating non-existent data directories. In particular, the deletion of the contents of home directories is explained by the fact that the /home section was created using the file "usr/lib/tmpfiles.d/home.conf", and consequently, the command "systemd-tmpfiles —purge" resulted in its deletion.

Initially, the error message was dismissed by Luca Boccassi, a systemd developer at Microsoft, as follows: "So, a function that is literally documented as 'all files and directories created by a tmpfiles.d entry will be deleted', which you knew nothing about, sounded like 'a good idea'? Did you even go and check what tmpfiles.d entries you had beforehand? Perhaps it's not a good idea to just run random commands you know nothing about, ignoring what the documentation is telling you? Just a thought, huh." In response, he was pointed out that in the documentation, the systemd-tmpfiles utility is still described as "a tool for creating, deleting, and cleaning up transient and temporary files and directories," even though this has not been true for a long time.

Ultimately, after lengthy discussions over the past few days, the behavior of systemd-tmpfiles was recognized as erroneous and changed. Initially, to prevent the erroneous deletion of home directories, the developers of systemd intended to remove the '—purge' option, but later adopted a modification that restricts the scope of the 'systemd-tmpfiles —purge' command — this command can now only be executed when explicitly specified in the command line with a specific configuration file from tmpfiles.d/ and will only delete the related files and directories. Additionally, the man page for systemd-tmpfiles has been updated with a more detailed description of the option and a warning about potential consequences.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster