Owww that’s a nice hint ! If I understand it correctly, my script in /home/server/myscript is at risk of privilege escalation because it’s owned by the user.
What’s the best practice to store scripts that have sudo commands? Because changing the owner of the home path to root doesn’t make sense.