Unicorn is downloaded and unpacked with elevated privileges
njv299 opened this issue · comments
Unicorn-1.0.1 is downloaded and unpacked by the build_unicorn_support.sh installation script with elevated privileges, which can make it a pain to uninstall. Beyond that, there is no reason for it to have those privileges in the first place.
I think the build_unicorn_support.sh script must be run as root/sudo in order to actually install the patched Unicorn binaries to the user's system, but the side effect is that a lot of the script runs with the wrong privileges. I attempted to fix this by prefixing a bunch of lines in the script by prefixing them like this:
sudo -u ${USERNAME} <command to run with less privileges>
This didn't work, though, and my bash-fu is weak.