Deprec2- chgrp: invalid group

March 19th, 2008
|

I was using deprec2 to install RoR, MySQL, Nginx, etc. to Slicehost using the crack_the_nut instructions on my mac.¬† I came to where I had to run the rails_stack (cap deprec:rails:install_rails_stack) and I kept getting an error that said “chgrp: invalid group deploy”.

Deprec automatically creates the deploy group as part of it’s recipes.¬† I was stunned.¬† Upon looking for an hour or two I came across a ‘grep’ that deprec runs.¬† It runs “sudo -p ‘sudo password: ‘ grep ‘deploy:’ /etc/group || sudo /usr/sbin/groupadd deploy”.¬† This grep checks the /etc/group file for any occurances of ‘deploy’. My deploy user was named pd_deploy.¬† Users live in the /etc/group file under their group following the following convention:

group: user1,user2,user3

My /etc/group file contained the following:

admin:root,pd_deploy

Deprec found ‘deploy’ in my user, pd_’deploy’, and thought that the group already existed.¬† It therefore failed to create a new one and blew up when it was trying to change a group that did not exist.

To save yourself a lot of hassle, don’t have ‘deploy’ anywhere in your /etc/group file, meaning, don’t have a user with ‘deploy’ anywhere in the name.¬† So no ‘deployuser’ or ‘user_deploy’.

Comments are closed.

Comments have been closed for this post. If you would like to ask a question or need help, please post in the forums.