To root or not to root?
Mojca Miklavec
mojca at macports.org
Mon Aug 12 21:31:57 UTC 2019
Dear Gerben,
We have a FAQ entry on that, I just couldn't find it right now.
On Mon, 12 Aug 2019 at 22:40, Gerben Wierda wrote:
>
> But I’m wondering if I should move back to running everything as ordinary user.
No.
What if one of the ports has "rm -rf $HOME" inside the Makefile?
And what if you actually need to install some stuff as root (like
installing a service to run your server for X)?
> Are there disadvantages to running to port commands as root?
No, but there are disadvantages to running it as an ordinary user.
You can run plenty of commands without sudo (port search, port info,
port list, port livecheck, ...)
[In theory also stuff like "port configure" or build, even though you
are then exposed to the same security risk if you build as regular
user and it doesn't help you either as you won't be able to install
such port without sudo permissions anyway.]
> If I want to revert, what should I chown to that user? How should ownership in /opt be?
root:admin
If you want to install as ordinary user, you would probably want to
put the package manager somewhere inside your HOME dir, and you'll
have to compile everything from source. (I'm actually not sure what
happens if you try to install as regular user under default prefix,
but I suspect you need to install MacPorts from source and explicitly
say that, and then binary packages also get disabled, but please don't
hold my word for that.)
Some users posted recipes to avoid having to type the password for the
"port" command.
Mojca
More information about the macports-users
mailing list