I would like to allow git to run 'git pull' as user 'www-data'. As far as i understand git ALL=(www-data) git pull in /etc/sudoers should make it.

Sadly i get an Syntax error for this line and visudo Syntax highlight breaks right after the "-" in 'www-data'

Can't find information regarding forbidden '-' in /etc/sudoers usernames. Any tips?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

You need to use full path name for 'git' command, following lines doesn't produce syntax error in visudo and works fine.

git ALL = (www-data) /usr/bin/git pull

link|improve this answer
found my problem already, thanks anyway. – Ben May 15 '11 at 13:13
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.