← Back to context

Comment by SoftTalker

1 month ago

We run linux machines with hundreds of user accounts, it's safe. Why would you make any important files world-writable?

That's the wrong question to ask.

The right question is whether I have made any important files world-writable.

And the answer is “I don't know.”

So, containers.

And I run it with a special user id.

Well, let's say you weren't on a machine with hundreds of users. Let's say you were on your own machine (either as a solo dev, or on a personal - that is, non server - machine at work).

Now, does that machine have any important files that are world-writable? How sure are you? Probably less sure than for that machine with hundreds of users...

  • If you're not sure if there are any important world-writable files, then just check that? On Linux you can do something like "find . -perm /o=w". And you can easily make whole dirs inaccessible to other users (chmod o-x). It's only a problem if you're a developer who doesn't know how to check and set file permissions. Then I wouldn't advise running any commands given by an AI.

    • Careful, you’re talking to developers now. Chmod is for wizards, Harry. One wouldn’t dream of disturbing the Linux gods with my own chmod magic. /s

      Yes, this is indeed the answer. Create a fake root. Create a user. Chmod and chgrp to restrict it to that fake root. ln /bin if you need to. Let it run wild in its own crib.

      2 replies →