Closed cehbrecht closed 3 years ago
@cehbrecht this would be useful for us. At the moment I set user = myuser
in custom.cfg
and it builds OK, but I need to edit the top-level nginx/nginx.conf
file so the first line is: user myuser mygroup;
If I change the custom.cfg
to user = myuser mygroup
then I get a failure with make install
as follows:
Traceback (most recent call last):
File "/code/local/pyramid-phoenix/eggs/zc.buildout-2.13.3-py3.6.egg/zc/buildout/buildout.py", line 2174, in main
getattr(buildout, command)(args)
File "/code/local/pyramid-phoenix/eggs/zc.buildout-2.13.3-py3.6.egg/zc/buildout/buildout.py", line 701, in install
[self[part]['recipe'] for part in install_parts]
File "/code/local/pyramid-phoenix/eggs/zc.buildout-2.13.3-py3.6.egg/zc/buildout/buildout.py", line 701, in <listcomp>
[self[part]['recipe'] for part in install_parts]
File "/code/local/pyramid-phoenix/eggs/zc.buildout-2.13.3-py3.6.egg/zc/buildout/buildout.py", line 1324, in __getitem__
options._initialize()
File "/code/local/pyramid-phoenix/eggs/zc.buildout-2.13.3-py3.6.egg/zc/buildout/buildout.py", line 1432, in _initialize
self.initialize()
File "/code/local/pyramid-phoenix/eggs/zc.buildout-2.13.3-py3.6.egg/zc/buildout/buildout.py", line 1441, in initialize
self.recipe = recipe_class(buildout, name, self)
File "/code/local/pyramid-phoenix/eggs/birdhousebuilder.recipe.nginx-0.4.1-py3.6.egg/birdhousebuilder/recipe/nginx/__init__.py", line 147, in __init__
make_dirs(self.options['var-prefix'], self.options['user'], mode=0o755)
File "/code/local/pyramid-phoenix/eggs/birdhousebuilder.recipe.nginx-0.4.1-py3.6.egg/birdhousebuilder/recipe/nginx/__init__.py", line 27, in make_dirs
etc_uid, etc_gid = pwd.getpwnam(user)[2:4]
KeyError: "getpwnam(): name not found: 'cwps users'"
The simple fix is to add group = mygroup
in to the custom.cfg
file.
necessary if user is not in the group of same name:
http://nginx.org/en/docs/ngx_core_module.html#user