We've got multiple issues here.
Changing Ports
To change the port Plone attaches to, edit buildout.cfg and look for the lines:
[instance]
<= instance_base
recipe = plone.recipe.zope2instance
http-address = 8080
Change '8080' to the desired port. If this is a ZEO configuration, look for 'client#' parts instead and change their port numbers. Choose ports > 1024. After editing, run buildout.
Running Buildout
If you used sudo
to run the Unified Installer, that caused it to create plone_buildout and plone_daemon system users. The "plone_buildout" user is meant to be used to run buildout, and owns the code files. The "plone_daemon" user is meant to be used to run the long-lived processes that connect to the Internet, and it owns the data.
This scheme is carefully contrived so that you do not have to run buildout as root, and so that the long-lived daemon processes will have (close to) minimum privileges. Under this scheme, you run buildout as the plone_buildout user, generally with the command:
sudo -u plone_buildout bin/buildout
The command "sudo -u username" causes the rest of the command line to be executed under the effective ownership of the specified user.
It is generally a very, very bad idea to run buildout as root. That's why the sanity check exists. Running buildout as root means that you are giving control of your system to the author of every setup.py file in every module downloaded by buildout. Don't do it.
A note on a common misconception: The Unified Installer, when run as root, via sudo, does not run buildout as root (at least not in any recent version). It uses root privileges to create a plone_buildout user, then runs buildout as that user.