Take the 2-minute tour ×  I need git user to run  chgrp -R www-
data linode.git/ chmod -R 770 linode.git/  as root. Only these
two commands and only for git user. How can I do that?
share|improve this question  2 Answers 2  up vote 2 down vote
accepted  Add git to sudoers using visudo. The lines you should
add will look something like this:  git hostname = (root)
NOPASSWD: /bin/chgrp -R www-data /path/to/linode.git/,
/bin/chmod -R 770 /path/to/linode.git/ share|improve this answer
I used joe to edit the sudoer file. I hope that's fine. When I
run the chgrp command I get this error chgrp: changing group of
linode.git/objects/pack': Operation not permitted`. If I run the
comman as root it works. –  Radek Nov 18 '10 at 0:53 @Radek: You
should do EDITOR=joe sudo visudo. If you don't use visudo bad
things could happen (see man visudo). Are you doing sudo -u git
chgrp ... when logged in as yourself or sudo chgrp ... as the
user "git"? In either case, you have to use sudo. –  Dennis
Williamson Nov 18 '10 at 3:00 @De