After the release of Systemd version 256, an update to version 256.1 has been issued to correct several errors. One significant problem addressed in this release is the behavior of the systemd-tmpfiles tool, which had the potential to recursively delete a user’s entire home directory.
The new version, 256.1, includes 38 minor changes and corrections. Of particular note are the modifications to the SystemD-TMPFILES command, used for managing files and directories. Red Hat’s documentation describes this tool as a method for managing and cleaning temporary files.
An issue was discovered by a GitHub user with the username ‘jedenastka’, where running the SystemD-TMPFILES command with the -purge option and no specified configuration file could lead to the deletion of the user’s home directory. This incident sparked a debate on the Mastodon platform.
In response, a member of the Systemd team, Luke Bokkassi, emphasized that users should carefully read instructions before using commands, as the team follows the documentation provided.
In the updated version 256.1, the systemd-tmpfiles command now includes additional warnings and instructions. The -Purge subcommand now requires the mandatory indication of a configuration file, with clearer warnings and a removal of the term “temporary” from the tool’s description.
This incident underscores the importance of thorough documentation review before executing system commands. Even small developer commands can lead to errors, and precautions should be taken to prevent accidental data loss.
The Systemd 256.1 release also includes various minor improvements and corrections, making it a significant update for users.