After deleting a web server, I started checking what I typed before hitting 'Enter'
- Reference: 1757917814
- News link: https://www.theregister.co.uk/2025/09/15/who_me/
- Source link:
This week, meet a reader we'll Regomize as "Wilma" who told us that while at university she volunteered with a group working on the student association's website.
The team completed a new version of the site, and Wilma got the job of uploading it
[1]
She therefore set out to delete the old site, before loading the new code.
[2]
[3]
"To my horror I realized I was in the root directory of the web server – /var/www –rather than the directory holding the files for the site," she told Who, Me? "I had just deleted all websites on the student association's webserver."
In her defense, Wilma told The Register that at the time "I was quite new to Linux and wasn't used to command line interfaces."
[4]
"The server was quickly restored from backups by someone competent and I was not allowed to work on the website anymore," she told Who, Me?
[5]Playing ball games in the datacenter was obviously stupid, but we had to win the league
[6]I was a part-time DBA. After this failover foul-up, they hired a full-time DBA
[7]CIO made a dangerous mistake and ordered his security team to implement it
[8]Teen interns brute-forced a disk install, with predictable results
"After that I developed the habit of double checking what I'm about to do on the Linux command line before pressing Enter," Wilma wrote. "Because as I learned, Linux will do what you said to do and it WON'T ask if you are sure."
Have you made a mistake with technology you didn't know well? The biggest mistake you can make is not [9]clicking here to send email to Who, Me? to share your story. ®
Get our [10]Tech Resources
[1] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2aMfjuOGUgh3JJAvB4NVi4AAAA1M&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aMfjuOGUgh3JJAvB4NVi4AAAA1M&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aMfjuOGUgh3JJAvB4NVi4AAAA1M&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aMfjuOGUgh3JJAvB4NVi4AAAA1M&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[5] https://www.theregister.com/2025/09/08/who_me/
[6] https://www.theregister.com/2025/09/01/who_me/
[7] https://www.theregister.com/2025/08/25/who_me/
[8] https://www.theregister.com/2025/08/18/who_me/
[9] mailto:whome@theregister.com
[10] https://whitepapers.theregister.com/
She had to Yabba Dabba Do it
Honey, I'm ~
You're such a good localhost
Wilma ...
... where's Fred?
Re: Wilma ...
They're having a barney.
Re: Wilma ...
She told you all you needed to know ... the student association's webserver was Fred, the Fucking Ridiculous Electronic Device.
Never delete the old web site, only rename it
Wilma was extremely lucky that there were backups of the other web sites, but her first mistake was to begin by DELETING the old web site directory, when a more experienced person would have RENAMED the directory e.g. "mv website website.old", before installing the new web site alongside it. That way, if the new version didn't actually work in the production environment, the old web site could be restored in seconds with a couple of directory renames.
Still, the wise learn by their mistakes.
Re: Never delete the old web site, only rename it
And then there will be
website.old
website.older
website.old_v2
website.old_v4
website.old_v4_new
The location of website.old_v3 is a mystery to this day
Re: Never delete the old web site, only rename it
v3 has the directory named website.even_older, which you did not see in your list since you used "website.old*".
Re: Never delete the old web site, only rename it
I seriously have files named "...even-olderest-but-not-quite..." in some folders somewhere.
Re: Never delete the old web site, only rename it
and website.old.temp
and website.old_v2 (copy) that isn't a copy.
Re: Never delete the old web site, only rename it
Use:
ls -al --full-time
or equivalent for your particular *nix.
Re: Never delete the old web site, only rename it
After long and painful struggle with versions of ".old" I now use the decommission date ".old_[yyyymmdd]". So, no one would even notice if there's .old_v3 missing.
Re: Never delete the old web site, only rename it
Her first mistake was agreeing to work on a live webserver for no pay.
Re: Never delete the old web site, only rename it
Only a fool learns from their mistakes. The wise learn from others' mistakes.
Re: Never delete the old web site, only rename it
I'd say a fool doesn't learn from their mistakes.
I make a zip
I don't rename, I make a zip
$ zip -r website-2025-09-15.zip website
I like using zip on Unix since its a format that windows users think they understand.
Works pretty much everywhere except these new-fangled containers...
Takes less space than a rename.
So I have zips littered over my filesystem with various datestamps.
And I still have to delete afterwards, so the terror is still part of the process...
Re: I make a zip
"I like using zip on Unix since its a format that windows users think they understand."
But you lose all of the ownership and permissions metadata. Real UNIX admins use tar.
Rights problem
My "why did Wilma have the rights to delete all that" alarm goes off. She should only have had write/delete rights to the one website she was supposed to update. A failure one step above, IMHO. And they should have implemented RBAC after that incident.
Though a few (20+) years back my mind was not so picky about who has which rights to prevent any disturbance of the infrastructure. Some things you learn along the reality. The university should have had that in place, but I know how it was "back then". Doesn't mean they are better now, but it should.
Re: Rights problem
It's a university. They don't have the time, nor the inclination, to do proper profile security.
You need to work on that server ? Fine. Here, you have admin rights on everything. If you foul up, it's not my fault.
A technique I learnt in Japan
1) Type the command but do not press
2) Take you hands away from the keyboard
3) Use your finger to point at each part of the command and check it's what you thought you had typed
4) Verify that you are where you are supposed to be
5) Commit the command
Also works with critical GUI-based activities, where you physically point at the various settings as you check them all.
People may think you look like a mad person, but that's much better than making a mistake.
Re: A technique I learnt in Japan
I suggest step 4 should be step 1.
Been there, done that
I once learned the hard way that '
After that, and a few other near-disasters with rm, I decided to precede every
rm
with executing
ls
And look at the output. Only then will I change 'ls' to 'rm' (or chmod).
And I also removed 'rm' from the history command, just to be sure, in ~/.bashrc:
export HISTIGNORE="rm*"
Re: Been there, done that
Also, add to your .bashrc:
alias rm='rm -i'
Re: Been there, done that
I do the same with any significant changes in the SQL data, and generally put the update or delete commands as comments so I have to manually select the code to execute it
SELECT xxx FROM yyy WHERE zzz
/*
UPDATE yyy SET aaa = bbb WHERE zzz
*/
Of course the very fact this forces me to think about what I'm typing generally prevents mistakes but just occasionally it saves me, usually 'cause there's something I've missed in the WHERE statement.
Re: Been there, done that
I thought the whole "* includes../" thing was fixed now? Otherwise my machine would have been empty many times over!
I'd go with Betty
But I'd be thinking of Wilma.
Re: I'd go with Betty
This is crazy. We're talking about going to bed with Wilma Flintstone.
You're right. We're nuts. This is an insane conversation.
She'll never leave Fred, and we know it.
will do what you said to do and it WON'T ask if you are sure
Unix had to save some paper and tape, after all prompts where bad on a teletype.
The problem is Linux still lives in that era, and can't grow up.
code that ate itself
I'm working on a Blazor app that clears a directory before users put files in it . The directory varies depending on circumstance and it picks up the location from its a database.
The other day ( in the development environment ) that filepath failed to come through so the app decided instead to just start deleting its OWN location!
It munched through the first layer of its source code in a sort of suicide attempt .
luckily the delete didn't include subfolders.
Being the sole authorI have only myself to blame.
robocopy MIR
Be very careful with mirror copy commands .
Your filepaths must be exactly right other wise folders won't match and be deemed "superfluous"
I once destroyed a colleagues windows\system32 folder this way while trying to push some files to his laptop
"After that I developed the habit of double checking what I'm about to do on the Linux command line before pressing Enter," Wilma wrote. "Because as I learned, Linux will do what you said to do and it WON'T ask if you are sure."
Where there's a Wilma there's a way