[Cialug] permission probs when two people use git for publishing

Jeffrey Ollie jeff at ocjtech.us
Tue Jan 3 11:35:33 CST 2012


On Tue, Jan 3, 2012 at 11:24 AM, Matthew Nuzum <newz at bearfruit.org> wrote:
> I have a website and we publish it like this:
>
> ssh server
> cd /path
> git pull
> sudo service apache2 reload
>
> Me and another person take turns doing this. We're both in a group called
> webdev. However, sometimes after one of us does a pull the other gets
> permission problems and we have to chgrp -R webdev . && chmod -R g+w .
>
> What's the best way to deal with this?

chmod g+s <dirname>

should force all files to have a group the same as the directory.

-- 
Jeff Ollie


More information about the Cialug mailing list