Using Macports as non-root?
ryandesign at macports.org
Mon Jun 27 20:19:01 PDT 2011
On Jun 27, 2011, at 21:48, Kevin Reid wrote:
> On Jun 27, 2011, at 19:36, Michael_google gmail_Gersten wrote:
>> Is there a good way to use macports as a non-root user for everything
>> except the install?
>> Or, is there a way to limit the installation functions to a single
>> setuid program?
> It is possible but unsupported. You have to build MacPorts from source, with options to set the install user and group; for example, I use:
> ./configure --with-install-user=pkgacct --with-install-group=staff
Building MacPorts with a non-root user and/or group *is* supported. Most users don't do this, so you may run into problems other users don't see. If so, please file bug reports.
> Most packages will install just fine under this configuration. Those that won't, you can try building as non-root followed by 'sudo port activate'.
> However, MacPorts does not make any effort to, when run as root, chown files back to the designated install user, so you may have to do cleanup later as root -- but overall, I have found this configuration to work quite well.
MacPorts 2.0.0 changes the situation a bit, by running as the "macports" user by default, not root.
More information about the macports-users