Skip to content
Home » Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug

Systemd 256.1 Maintenance Release Fixes Home Directory Deletion Bug

If you are using Systemd 256, you should upgrade now to 256.1 to prevent potential data loss.

A critical issue has been discovered in the Systemd system manager version 256 that caused the deletion of the contents of the /home partition when executing the “systemd-tmpfiles –purge” command. This command, added in Systemd 256, was intended to delete all files and directories created through settings in tmpfiles.d. However, due to a misleading name, it appeared that the deletion only affected temporary files, while in reality, it also removed non-existent data directories.

The bug was initially dismissed by a Systemd developer, who suggested that users should have read the documentation before running the command. However, it was later acknowledged that the documentation was outdated and did not accurately reflect the behavior of the systemd-tmpfiles utility.

The Systemd 256 release note and the systemd-tmpfiles man manual stated that the “–purge” option deletes all files and directories created through the tmpfiles.d settings. However, the name “tmpfiles” in the utility name was misleading and created confusion, leading users to believe that deletion only affects temporary files. In reality, the tmpfiles.d settings are not limited to temporary files and are also used to automatically create non-existent data directories.

The removal of the contents of home directories was explained by the fact that using the file “/usr/lib/tmpfiles.d/home.conf” the partition “/home” was created, and the command “systemd-tmpfiles –purge” led to its removal.

After much discussion, the behavior of systemd-tmpfiles was finally found to be erroneous and changed. Systemd initially intended to remove the “–purge” option to prevent erroneous removal of home directories. However, a change was adopted that limited the scope of the “systemd-tmpfiles –purge” command. This command can now only be executed if a specific configuration file from tmpfiles.d/ is specified, and it will only delete the files and directories associated with it.

In addition, a more detailed description of the option and a warning about the possible consequences have been added to the systemd-tmpfiles man manual.

This maintenance release of Systemd 256.1 fixes this critical bug. Most of the Linux distributions should be patching this within a few days. So, you will get this version via standard OS updates.

More reading and PR:

Recent articles from DebugPoint.com

Loading...
Tags:
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments