Configuring the Zope 2 effective user dynamically
Another simple thing we can do to secure our system is to operate our Zope 2 instances with only those operating system users who have enough permission to execute the instances. In fact, Zope 2 will not run as root on UNIX-like systems.
However, we frequently forget to do this. More importantly, sometimes we want to be more explicit with our configuration. This is where the effective-user
parameter comes in handy. If no effective user is set, then Zope 2 will run as whoever executes the process.
You could set the effective-user
manually or you could use the gocept.recipe.env recipe (http://pypi.python.org/pypi/gocept.recipe.env) to set it. In the case of manual configuration, you may find it tedious to test your production configuration on systems that do not have the desired effective user (or you may not; this is mostly subjective). In the case of no configuration, you may find it annoying to be reminded that you cannot run Zope 2 as root...