In Chef how do you override default attribute values in node.json

chef

I'm running chef-solo with chef-solo -c solo.rb -j node.json -ldebug and it's failing because nginx cookbook/recipe refers to user "www-data" which I don't have. Can I change the value in node.json file? My node.json looks like this:

{
  "nginx": {
    "user": "my_username"
  },
  "run_list": [
    "recipe[nginx]",
    "recipe[mysql::server]"
  ]
}

My problem is the Opscode nginx recipe appears to ignore this setting.

Best Answer

Yes :-)

www-data is just a default user that is found on debian (and debian-like systems) for running web servers. Change it to something other than root and you should be fine. For most distros where there is no www-data there is a httpd user, otherwise you can nobody.

If you are on windows then use an appropriate user.