I have a machine running Ubuntu with a SSH config file in ~/.ssh/config
with the following permissions (default when creating a new file)
-rw-rw-r-- 1 dev dev 75 Oct 26 20:13 config
After creating a new user (test) with the same primary group (dev) as the existing user (dev), I am no longer able to git clone when logged in as dev.
dev@vm:~$ git clone ...
Cloning into ...
Bad owner or permissions on /home/dev/.ssh/config
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Googling around seems to suggest that I can fix the ssh problem by running chmod 600 ~/.ssh/config
, but why would this even be an issue? How can I fix this systematically, since I assume this would've affected other files too?
Thanks!
ls -ald $HOME
will showrwxr-xr-x
. The problem is detected by ssh, but the root cause is Ubuntu. ("problem" in this case being that this new user you created can get into and change your ssh config etc)