1703
submitted 7 months ago by roon@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] masterofn001@lemmy.ca 37 points 7 months ago* (last edited 7 months ago)

As a user, I sometimes do everything I can to see what breaks a system. (Often unintentionally)

Then, I don't do those this things.

(Learning permissions on Linux was a great way to destroy a system. Eg "sudo chown -R user:user /" didn't work as I first thought)

[-] fubbernuckin@lemmy.world 9 points 7 months ago

Ha, I've done the same thing

[-] virku@lemmy.world 6 points 7 months ago

Let me guess; does it recursively remove all permissions from the file system?

[-] IsoKiero@sopuli.xyz 12 points 7 months ago

The command in question recursively changes file ownership to account "user" and group "user" for every file and folder in the system. With linux, where many processes are run as root and on various other accounts (like apache or www-data for web server, mysql for MySql database and so on) and after that command none of the services can access the files they need to function. And as the whole system is broken on a very fundamental level changing everything back would be a huge pain in the rear.

On this ubuntu system I'm using right now I have 53 separate user accounts for various things. Some are obsolete and not in use, but majority are used for something and 15 of them are in active use for different services. Different systems have a bit different numbers, but you'd basically need to track down all the millions of files on your computer and fix each of their permission by hand. It can be done, and if you have similar system to copy privileges from you could write a script to fix most of the things, but in vast majority of cases it's easier to just wipe the drive and reinstall.

[-] notfromhere@lemmy.ml 6 points 7 months ago

I am so grateful for snapshotting file systems like ZFS. Restore the last working snapshot and continue on.

[-] bdonvr@thelemmy.club 4 points 7 months ago

Recursively changes ownership of all files to the user, which breaks tons of system processes

this post was submitted on 10 Apr 2024
1703 points (99.0% liked)

Programmer Humor

32558 readers
479 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS