Edit: The link.
There were lots of good titles for this submission, as in "Breaking news: Poettering clueless?" to finally disprove Betteridge's law, or "systemd surprisingly not as good as advertised" or "Breaking new: systemd broken" or "Poettering censors critics after epic fail".
Systemd implementation of "rm -rf .*" will follow ".." to upper directory and erase /
How to reproduce:
# mkdir -p /foo/dir{1,2}
# touch /foo/.bar{1,2}
# cat /etc/tmpfiles.d/test.conf
R! /foo/.* - - - - -
Reboot.
After the issue was fixed, finally Poettering added this gem of wisdom:
I am not sure I'd consider this much of a problem. Yeah, it's a UNIX pitfall, but "rm -rf /foo/.*" will work the exact same way, no?
The answer to this question, as many clarified for him, obviously is a loud "NO!". After being told a couple of times in no uncertain terms, the thread was closed for non-developers
poettering locked and limited conversation to collaborators 4 hours ago
for which I proposed the "freedom-of-speech" department (although I admit it is a weak proposal).
(Score: 3, Insightful) by tangomargarine on Monday April 17 2017, @09:07PM (10 children)
rm -rf is about the last command I would trust anyone to reengineer even if they *did* know what they were doing. It's almost like he's *trying* to piss people off.
"Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
(Score: 3, Insightful) by Marand on Monday April 17 2017, @09:31PM (2 children)
Well, they already re-overengineered the single most important process on the system (init), so why not rm too?
(Score: 1, Funny) by Anonymous Coward on Tuesday April 18 2017, @01:33PM (1 child)
STOP GIVING THEM IDEAS!! :-(
(Score: 2) by Marand on Tuesday April 18 2017, @04:36PM
Based on the summary, I think it's safe to say they already had that idea before I commented. :(
(Score: 2) by edIII on Monday April 17 2017, @09:37PM (6 children)
LOL. Yeah, rm -rf is very fucking dangerous. Especially messing around as root. With undelete capabilities not really being present Linux/BSD you are left with data recovery tools. The only thing funnier is that the command in question deletes all the tools you need to do anything :)
rm is a command that requires a tremendous amount of trust in the developers. I still get nervous every time I type it, and I do know what I'm doing too.
Technically, lunchtime is at any moment. It's just a wave function.
(Score: 2) by kaszz on Monday April 17 2017, @10:15PM (3 children)
Neither NTFS have any undelete capability or does it?
(Score: 2) by fnj on Tuesday April 18 2017, @12:02AM (1 child)
You can undelete in NTFS with proper tools to a certain extent, and you can more or less in ext2/3/ext4 too. Not my cup of tea, but I know people who profess to have had success in both cases.
You can leverage snapshots in ZFS as insurance against user boo-boos _if_ you think to make them before you do particularly risky operations.
(Score: 2) by edIII on Tuesday April 18 2017, @08:10PM
I've been involved in far too many data recoveries over the last 30 years. I remember when recovering from FAT meant huge piles of floppies shipped back to you with individual files missing the file names of course. A pretty sharp outfit also analyzed the files too and categorized them into what types of files they were. Technically that was recovery, but it meant it people combing through files for months trying to rename and organize them.
Recovering from ext2/3/ext4 is much harder than recovering from NTFS. I did get lucky using Stellar Phoenix (I think) on that Linux partition and recovered all of the files. That NTFS recovery was also an enterprise RAID that involved Drive Savers, and they were expensive as fuck. They say they are super heroes, and boy do they want to get paid like them. I never even tried to do it myself since I suspected drive damage occurred, of which it did, of which the Dell L3 tech on the phone didn't believe there was, and to which eventually Drive Savers described it like an action movie with explosives all occurring on the platters. They actually explained it like that with those words :)
In both of those situations, the people coming to me had no backups whatsoever. It was the only copy in the world. That's what I remember about data recovery. An owner of the data pacing around behind you acting like the world is over. Fun times.
These days I just make sure I have a snapshot every 24 hours and have forgotten about data recovery. That would mean I failed at distributing the data across more than one machine.....
Technically, lunchtime is at any moment. It's just a wave function.
(Score: 2) by edIII on Tuesday April 18 2017, @07:47PM
Technically, no. You're correct :)
However, Windows never actually deletes a file. That's their trick. They just take it and hide it in a bin, and then gave it that goofy name, "Recycle Bin". What were they recycling again?
Linux and BSD are perfectly capable of doing the same thing, but the philosophy I see in OpenBSD is that the majority of deletes need to be permanent. rm is capable of overwriting files with random data too. Linux has never been big on the quasi-delete either.
Technically, lunchtime is at any moment. It's just a wave function.
(Score: 2) by TheRaven on Tuesday April 18 2017, @09:00AM (1 child)
sudo mod me up
(Score: 2) by edIII on Tuesday April 18 2017, @07:43PM
That's pretty cool. Now if they can just get ZFS into OpenBSD....
Technically, lunchtime is at any moment. It's just a wave function.