Best Practices: creating alternate user account to use MacPorts in?
Ryan Carsten Schmidt
ryandesign at macports.org
Thu Jul 10 14:52:37 UTC 2025
On Jul 2, 2025, at 16:16, Nick wrote:
> I'm doing some sandbox testing. I see a 'macports' user, however in my first installation many of the files in /opt/local are owned by root. I was hoping to install a specific to a user account for all MacPorts.
Perhaps you have good reasons for doing this, but since you mention the term "sandbox", I should point out that when installed as root, MacPorts uses sandboxing. Though you run the port command using sudo, MacPorts then drops privileges to the macports user so that port installations cannot unintentionally or maliciously alter anything else on your computer. If you build MacPorts from source configured not to use root, then you don't get that protection and port installations would technically have the ability to affect files outside of MacPorts that are owned by the user you configured MacPorts to use. Therefore we recommend using a standard (root) MacPorts installation.
More information about the macports-users
mailing list