0

I have always permission error when pushing to Git. I have found this solution.

After applying this commands for specific git repo:

sudo chgrp -R mygroup *

I have this error:

sudo: /etc/sudoers is owned by gid 1000, should be 0
sudo: no valid sudoers sources found, quitting

Why I have this error? What did I do wrong? What is the relation between sudo chgrp -R mygroup * and sudoers?

Community
  • 1
  • 1
  • We have to switch assign our permissions to each other in every push!. But I want to know how sudo chgrp -R mygroup * could change the sudoers? – DjangoLady Aug 21 '14 at 08:16
  • Are you sure you did the `chgrp` command in the right directory? Have a look at `ls -l /etc/sudoers` I guess the group is wrong. While you are at it, look at `ls -l /etc` and see if more harm was done. – martin Aug 21 '14 at 08:51
  • with `groups` command I have found the group name and then `sudo chgrp -R mygroup *` – DjangoLady Aug 21 '14 at 08:57
  • @DjangoLady Yes, but where have you done that? Did you look at the output of my above commands (the first one?) Check the group column. – martin Aug 21 '14 at 09:29
  • -rw-r--r-- 1 root developers 1253 Aug 20 09:39 passwd (but this is not the time that I have apply the command) – DjangoLady Aug 21 '14 at 10:47
  • @DjangoLady, that does not look good. Somebody (if not you, or the changes in git repository) changed the group on the wrong files. I can't really help you from here, but this is very hard to fix (correctly and completely) again. – martin Aug 21 '14 at 11:13

0 Answers0