chmod -R hit me, again... Anyone else who faced these sys-admin woopsies?
chmod -R hit me, again... Anyone else who faced these sys-admin woopsies?
sudo's Hall of pain
chmod -R hit me, again... Anyone else who faced these sys-admin woopsies?
sudo's Hall of pain
More than a sys admin thing is a general linux user thing; i switched from an emmc computer with no drives marked as sdx; to one with nvme and hdd; i was used to my old pc where sda was whatever usb stick i plugged in; and i used dd with sda1... I nuked 1tb of data and i am still running photorec to try and recover something at least; fml.
Am I the only one around here who does backups?
Unfortunately to do backups i need the money to buy a drive to do backups on; most of my pcs are literally made out of scrap parts from broken machines.
I have plenty of non-critical Linux ISOs that I don't back up (because that'd be like 12 TB).
But I'd still be pissed if I accidentally wiped them.
Nope
Expectation: apply chmod to all subdirectories.
Reality: Remove read permission
For chmod, chown, chattr, etc, -R
is used to recurse subdirectories.
That's what -R does in chmod as well? I feel like something here is going completely over my head. Or are you-all using another version of chmod?
Some time ago I wanted to clean up home directory files permissions to be not readable by group or others. Instead of just removing group/other permissions I hard-set all directories to 700 and all files to 600.
Took quite some time to repair not working scripts and "application containers".
Well I nuked myself with chmod -R on my home directory this morning... My day is now dedicated to reinstalling nixos on my laptop... Glad I didn't do this on a production server...
Will be extra cautious now with the -R commands
PS: I now see the need of timeshift despite of using nixos... I could have backed up my home dir... And restore the prev state
Not chmod related, but I've made some other interesting mistakes lately.
Was trying to speed up the boot process on my ancient laptop by changing the startup services. Somehow ended up with nologin
never being unset, which means that regular users aren't allowed to log in; and since I hadn't set a root password, no one could log in!
Installed a different version of Python for a project, accidentally removed the wrong version of Python at the end of the day. When I started the computer the next day, all sorts of interesting things were broken!
If you chmod verbose this wouldn't have been an issue
Thank you for your sacrifice.
I definitely would have made this mistake.