I have a web project for which I need to run a command when a specific URL is requested, but that command requires root privileges.
The project is served with a Python process (Django), of course running it with root privileges is not an option.
The command's parameters are hardcoded making it impossible to inject anything and it's a right protected application so I can be slightly more liberal on security since the users who will have access to it will be trustworthy (hopefully). However ideally I would like to do it securely.
.