On Unix, find if user who executed the program is root?
-
22-07-2019 - |
Question
I'm writing a rake script and would like to detect (using Ruby rather than bash if possible) if the user who executed the rake script has root privileges.
If it is not root then I would like to terminate the script.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow