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.
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.
chmod -r uses symbolic mode. Specifically it removes read permissions for the file. Other forms include w for write and x for executable. + can be used to add permission.
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!