108
submitted 1 week ago* (last edited 1 week ago) by petsoi@discuss.tchncs.de to c/linux@lemmy.ml

It's actually not a bug, but obvious behavior.

top 20 comments
sorted by: hot top controversial new old
[-] AProfessional@lemmy.world 52 points 1 week ago

TL;DR for anybody worried. systemd-tmpfiles --purge was too broad in scope (and has a confusing name) so now you must be more specific when using it to avoid accidentally deleting things.

[-] slacktoid@lemmy.ml 7 points 1 week ago

But you should have read the docs completely and figured that out /s

[-] clutchtwopointzero@lemmy.world 35 points 1 week ago

using systemd instead of rm -Rf is not the Unix way!

[-] lengau@midwest.social 24 points 1 week ago
[-] taanegl@beehaw.org 1 points 3 hours ago
[-] mesamunefire@lemmy.world 18 points 1 week ago
[-] ogeist@lemmy.world 9 points 1 week ago
[-] ryannathans@aussie.zone 17 points 1 week ago
[-] taanegl@beehaw.org 1 points 3 hours ago

Thanks Microsoft for spotting that, and thanks to Google and CloudFlare for blocking or redirecting Polifyll.io network traffic.

Credit where credit is due.

[-] drwho@beehaw.org 3 points 1 week ago

I've been saying, Microsoft hired Poettering to thank him for fucking up Linux so much with systemd.

[-] kenkenken@sh.itjust.works 14 points 1 week ago
[-] Templa@beehaw.org 10 points 1 week ago

If it was intended but not properly documented as it says, why does it keep being called a bug?

[-] dgriffith@aussie.zone 11 points 1 week ago* (last edited 1 week ago)

The bug is the lack of documentation and that a simple unguarded command can erase all user's data on the system.

Also, the principle of least surprise would like a word.

If I look at the command line arguments of a program called "systemd-tmpfiles" and one of them is called "purge" I will generally assume that option will purge temporary files.

Now it turns out that someone decided that this program would be a simple way to do something with /home directories(*) so they included /home in the config file for the program, the file that the program reads by default when it is invoked.

Who decided it would be a good idea for it to deal with /home?

Wellllll...

https://github.com/systemd/systemd/blob/main/tmpfiles.d/home.conf

(*)I have no idea what this program is doing with /home in its config file. I will presume that there is a useful and mostly logical reason for it, and that this command line option was just an unfortunate footgun for those users who were not intimately familiar with systemd.

[-] NekkoDroid@programming.dev 3 points 1 week ago

There were talks a few years ago about changing sd-tmpfiles name but it was decide not worth it due to the churn and bikeshedding it would cause.

sd-tmpfiles is generally used to create, modify (e.g. permissions) and remove directories on the system. The home.conf is intended for systems that only ship /usr/ (e.g. containers) to create /home/ and /srv/ as a separate subvolume on btrfs

[-] MyNameIsRichard@lemmy.ml 1 points 1 week ago

I will presume that there is a useful and mostly logical reason for it

Home directories are temporary, obviously

[-] Bitrot@lemmy.sdf.org 3 points 1 week ago

“Breaking userspace” is often considered a bug even if the code doing so is working as intended. Deleting user data because they bundle a config file deep in the directory tree for a completely different use case was not intended behavior even if one of them is defensive about the logic.

[-] cerement@slrpnk.net 1 points 1 week ago

it was clearly a feature

[-] bloodfart@lemmy.ml 6 points 1 week ago

Oh that’s a good normal thing for it to do.

[-] MonkderDritte@feddit.de 5 points 1 week ago

So it doesn't break userspace anymore?

this post was submitted on 20 Jun 2024
108 points (95.8% liked)

Linux

45418 readers
2195 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS