are there pre-built binaries that can run on non privileged account?

Joshua Root jmr at macports.org
Thu Jul 3 14:31:58 UTC 2025


On 3/7/2025 14:47, Nick wrote:
> I'm currently using macports-base configured as:
> --prefix=${HOME}/mp --with-install-user=u00 --with-install-group=g00
> with some success so far, compiling everything from a clone of macports- 
> ports.

FYI, the --with-no-root-privileges configure option will automatically 
set the installer user and group based on the current user, and will 
also set the initial value of startupitem_install to "no".

> I encountered an issue, where 'xinit' build broke because it required 
> root privileges.  I worked around that by changing the Portfile.

That allowed you to install it, but does it actually work without root?

> I'm curious if the buildbot build non privileged binaries as well?

Our buildbot builds binaries only for the /opt/local prefix, which is 
the main reason you can't use them from a typical non-root installation. 
In principle, someone could run a buildbot configured to build ports for 
whatever prefix they like, but it would not be widely useful if that 
prefix is inside the home directory of a particular user.

The permissions on our binaries are set such that anyone on the system 
can read the non-sensitive files and run the executables after the 
binary has been installed into a root-owned MacPorts prefix, so in that 
sense most of the binaries are unprivileged.

Some binaries will of course require additional privileges to do their 
job when run, and many will run more securely when started as root 
because then they can setuid to an unprivileged user right after starting.

- Josh


More information about the macports-dev mailing list