1
votes

I have been involved in spinning up an nginx server using chef. I use berkshelf to manage the dependencies of site cookbooks. Whenever I try to run the recipe "nginx" (http://community.opscode.com/cookbooks/nginx) , Chef throws an exception

usermod -s '/bin/false' -d '/var/www' nginx returned 8, expected 0

stating that

usermod: user nginx is currently logged in

I believe that being run as root user, there shouldn't be any problem creating an nginx user but how to usermod on the created nginx user while running a recipe?

1

1 Answers

2
votes

Got it corrected. There was an nginx instance running in the machine with "nginx" user privilage. Hence the error. So make sure that no process is running under the "nginx" user.