Why was the macports user implemented

Jeremy Lavergne jeremy at lavergne.gotdns.org
Wed Aug 31 12:40:43 PDT 2011

On Wed, August 31, 2011 3:26 pm, Rodolfo Aramayo wrote:
> Great. Good explanation. Thanks, but then that begs the question as to
> why the files in '/opt/local/' are not owned by macports:macports and
> instead by 'root:admin and/or root:wheel'? Am I missing something in
> here??

Once things are built by the macports user, MacPorts trusts itself to
install them: this is why they're owned by root when you run MacPorts with
sudo. It is only during the specific phases of the whole process that
MacPorts will drop its privileges to the macports users, and afterwards
pick them back up.

> Regardless we have to 'sudo'  to install MacPorts and its ports, right?

One can also build ports without sudo, and they'll be built and installed
in your $HOME; one can compile MacPorts itself to live entirely in your

> You said " The typical way of implementing this is creating a user and
> group, so
>> permissions on files can be set to `macports:macports`."
> can be set or must be set??

I'd assume "can be". You can change this user by compiling MacPorts
itself: check out MacPort's own ./configure options. There might be a
macports.conf setting for this, but I cannot authoritatively answer that
one :-) Ryan knows perhaps?

> Does MacPorts checks if the ports are owned by macports:macports?

I will again assume here: no. I think it will simply test that it has
permission to do what it is trying to do, and give you an error if it
cannot complete it. Ryan, do you know better? :-)

More information about the macports-users mailing list