Disclaimer: Do not run this command.

1st pane: A person whispering to another's ear, captioned "sudo chmod -R 777". 2nd pane: An arm getting goosebumps.

all 64 comments

sorted by: hot top controversial new old
[–] 146 points 1 year ago (21 children)

Obligatory DO NOT RUN THIS ON YOUR COMPUTER (or anyone else's).

You'd think with fully open permissions, everything would work better, but many programs, including important low level things, interpret it as a sign of system damage and will refuse to operate instead.

If you do run it, you'd better have a backup or something like Timeshift to bail you out, and even if you do have that, it's not worth trying it just to see what will happen.

It's not quite as bad as deleting everything because you can boot from external media and back up non-system files after the fact, but the system will almost certainly not work properly and need to be repaired.

You have been warned.

  • source
  • hideshow 21 child comments
  • [–] 66 points 1 year ago (9 children)

    New guy at work ran this to try to fix permissions on his home folder, accidentally ran it on root (both would have been bad)

    Several highly paid and experienced Linux admins finally just gave up and deleted the server and built a new one from the backups.

  • source
  • parent
  • hideshow 9 child comments
  • [–] 35 points 1 year ago (7 children)

    Which, honestly, is the better way to go. Treat your compute resources like cattle, not pets.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 25 points 1 year ago* (5 children)

    One of our servers is a rotting carcass being kept alive by our collective prayers. It runs Windows 7 and custom software whose developer is dead and the source is missing, nothing has been updated for over a decade, and it has its own independent UPS because once it goes down, it has an extremely slim chance of recovering, and we're afraid to test it. It controls the card entry system into the building, including the server room. Boss doesn't want to replace it because we'd have to replace all of the terminals and controllers too, and it hasn't catastrophically failed yet.

    You're right. It's not a pet. It's like one of the Saw movies: if it dies, we're all fucked.

  • source
  • parent
  • hideshow 5 child comments
  • The question I often ask clients who think this way is "How much would it cost if it did fail? Let's say this happened today. What would be the cost to replace it NOW and not only that but make sure people who are working can still do so with the interruption?

    Now how much would it cost to schedule the interruption and manage the fall out in a way that is controllable?

    For some, the catastrophic failure points to "hey I fixed the thing!" And the incentives for that kind of person are different from the person whose job is to mitigate risk.

    It sounds like your boss is the former. In which case it's going to be fun when it fails.

  • source
  • parent
  • [–] 3 points 1 year ago (1 child)

    I'm sure there's a good reason (or at least a believable reason) but I'm curious now, why can't copies be made of the binary/data and start trying to get it running on a VM or another box?

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    The reason is that we want it to fail. My original comment was more emotive than descriptive. The system is horribly designed and a fucking menace on the best day, so short of direct sabotage, we're doing what we can to force the bossmang to replace it.

  • source
  • parent
  • [–] 5 points 1 year ago*

    I learned this relatively quickly running my own server with the intention of my family also using it. Data on a separate drive, backed up regularly and automatically. System on it's own drive, dd'd when it's in it's final state and backed up before I screw around any deeper than trying out a new container. I can bring my server back up in however long it takes to transfer data.

  • source
  • parent
  • [–] 8 points 1 year ago

    Someone actually ran it on a server at my workplace, trying to fix file permissions on a samba share. Broke SSH and the samba daemon. Thankfully I was able to fix by removing the permissions from the config files the error logs pointed to.

    Just saying, I think it was a ChatGPT idea, other people use it every day. I only use it if I'm completely stumped, and only take it as suggestions.

  • source
  • parent
  • [–] 7 points 1 year ago (3 children)

    One time I introduced someone to Linux then left them to their own devices.

    I returned to them hours later to find out they had gotten annoyed with permissions errors and run chown -R ${THEIRUSER}: /.

    The results were not what they wanted.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 1 year ago (1 child)

    I did this once by accident (bad scripting, managed to abort it,) it wasn't too bad until sudo told me that the sudoers file had the wrong owner. I then learnt that there are other ways to become root.

    OS ran for another ~6months after I re chowned etc to root.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago (3 children)

    What exactly does that command do

  • source
  • parent
  • hideshow 3 child comments
  • [–] 7 points 1 year ago (1 child)

    It sets permissions (ch ange modification rights) on all files (-R = recursive, stepping down through directories) in the file system (hence starting at /) so that they can be read, (re)written and executed as programs by all users (the 777 part). 000 would be no permissions for anyone (except for the root user), which would be just as bad.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    Excellent summary. Just as a bit of trivia I'll add that Linux file permissions go like r w x (read write execute) = 4 2 1, so taken all together a 7 means the indicated user can do all those operations.

    And yeah, it breaks your system in surprising ways. Most people would just have to start over.

  • source
  • parent
  • [–] 50 points 1 year ago (11 children)

    asexuals and demisexuals be like sudo chmod -R 700 /

  • source
  • hideshow 11 child comments
  • [–] 58 points 1 year ago* (9 children)

    Doms with cuck and denial fetishes have partners like

    sudo chmod -R 077 /
    
  • source
  • parent
  • hideshow 9 child comments
  • [–] 14 points 1 year ago (6 children)

    What do the funny words mean? (i understand neither 700 & 077)

  • source
  • parent
  • hideshow 6 child comments
  • [–] 42 points 1 year ago* (last edited 1 year ago) (3 children)
    • sudo is telling the computer to do this with root privileges.
    • chmod sets permissions.
    • Each digit of that three-digit number corresponds to the owner, the group, and other users, respectively. It's 0–7, where 0 means no access and 7 means access to read, write, and execute. So 077 is the exact inverse of 700, where 077 means "the owner cannot access their own files, but everyone else can read, write, and execute them". Corresponding 700 to asexuals is joking that nobody but the owner can even so much as touch the files.
    • / is the root directory, i.e. the very top of the filesystem.
    • The -R flag says to do this recursively downward; in this case, that's starting from /.

    So here, we're modifying every single file on the entire system to be readable, writable, and executable by everyone but their owner. And yes, this is supposed to be extremely stupid.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 11 points 1 year ago (1 child)

    This is the best comment I’ve come across in a while. Thank you so much for breaking it down so well.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 1 year ago

    Just wait until you need to figure out what you want when you want something other than all or none for those permissions. 4 is read, 2 is write, 1 is execute. Add them up to get what you want for each owner/group/other portion.

  • source
  • parent
  • [–] 23 points 1 year ago (1 child)

    Taking the term open sourced to a whole new level!

    Everybody has permissions!

  • source
  • hideshow 1 child comment
  • [–] 21 points 1 year ago

    definitely nsfw

  • source
  • [–] 19 points 1 year ago (1 child)

    Sorry, that's a huge turn off. Filesystem perms exist for a reason and should be respected

  • source
  • hideshow 1 child comment
  • Dear god. We’re exposed.

  • source
  • [–] 32 points 1 year ago (3 children)

    If I wanted Windows perms I would have installed Windows

  • source
  • hideshow 3 child comments
  • [–] 19 points 1 year ago (2 children)

    Windows perms are pretty locked down though. Sometimes I can't delete my own files because I need permission from "Administrator" :/

    You can actually use Windows-style permissions (ACLs) on Linux via setfacl.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 1 year ago (1 child)

    If only...

    Those are POSIX acls, and they suck

    We could have had NFSv4 ACL, of which windows ACLs are a subset. In fact, every other unix os did... Except for Linux, they decided it didn't fit well to Linux. And so we are stuck with UGO permissions, and posix ACLs.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 14 points 1 year ago

    all your base are belong to us

  • source
  • [–] 12 points 1 year ago

    Back in my early days of Linux I ran this exact command, I forget why, but for some reason my WiFi stopped working immediately after and then SELinux started yelling at me for some reason. I tried to fix SELinux and most certainly commited an innumerable amount of cardinal sins.

    I had to reinstall whatever distro I was running at the time

  • source
  • [–] 21 points 1 year ago* (2 children)

    I did chmod -R 666 / when I started playing with Linux in 1999. It did not end well.

    Sudo didn't really exist back then, you ran things as root like real men. /s

  • source
  • hideshow 2 child comments
  • [–] 28 points 1 year ago (4 children)

    Most Linux filesystems, being case sensitive, won't find the SUDO command.

  • source
  • hideshow 4 child comments
  • [–] 6 points 1 year ago (4 children)

    Does anyone else pronounce it "schmod"?

  • source
  • hideshow 4 child comments
  • [–] 5 points 1 year ago

    Made me puke in my mouth

  • source
  • [–] 3 points 1 year ago

    I accidentally did this on a work computer, just going with tab completion. Things started to break very quickly. I don't think I could even run sudo or rm lol. Total wash. Had to reinstall (this was on my first week in office - so embarrassing!).

  • source
  • [–] 2 points 1 year ago (1 child)

    Is a woman telling you:

    "you can do whatever you like, but so can my Ex your mama and the Dallas cowboys."

    Really that much of a male fantasy?

  • source
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    Missing setuid. You have just bricked your system good job

  • source