I have a very specific command I'd like anyone to be able to run. For the sake of example, let's pretend the command is ip addr flush dev foo0
.
I found this and this. Unless I'm misunderstanding something, I think it's exactly what I need.
echo "ip addr flush dev vboxnet0" > script.sh
chmod +x script.sh
chmod +s script.sh
sudo chown root script.sh
sudo chgrp root script.sh
But then,
./script.sh
Failed to send flush request: Operation not permitted
Why?