Hello! Let’s say I have an executable file, but I’m unsure of the source, and may contain bugs/errors/malwares/bad things that can mess up my machine. I want to execute it anyway, but I want to make sure that it does not mess things up. Is it possible to create a “sandbox” folder, place the executable inside it, and then give all files inside that folder only write privileges inside that folder, and not outside? so that echo "hello" >> log.txt would work, but echo "hello" >> ~/log.txt would not?

EDIT: thanks to everyone for the answers! I decided to opt for a VM to minimize the risk, but chroot is probably a faster solution for not-so-dangerous files

  • ThreeHalflings@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Also worth saying 99.9% of air gap failures are due to some idiot getting lazy with a usb stick or a phone. They’re a removed to work with.

    (Another 0.09% are someone plugging the wrong cord into the wrong switch by accident or stupidity)