My ~/.ssh/id_rsa is 644 when it should be, I believe, 600. The host is Windows 10 and I have both git-bash 2.17.0 and MobaXterm 10.5-3582.

If I try to change group, git-bash will fail with

$ chown :Users ~/.ssh/id_rsa*
chown: invalid group: ‘:Users’

MobaXterm will, however, change the group. Regardless, neither changes permissions, whether I use

chmod 600 ~/.ssh/id_rsa


setfacl -s u::rw-,g::---,o:--- ~/.ssh/id_rsa

The file permissions remain unchanged:

$ ll ~/.ssh/id_rsa
-rw-r--r--    1 MyUser UsersGrp      3243 Nov 30 18:24 /home/mobaxterm/.ssh/id_rsa


$ getfacl /home/mobaxterm/.ssh/id_rsa
# file: /home/mobaxterm/.ssh/id_rsa
# owner: MyUser
# group: UsersGrp

$ ls -la ~|grep .ssh
drwxr-xr-x    1 MyUser UsersGrp         0 Nov 30 18:24 .ssh

("MyUser" is my own user, not literal)

  • Only root user can change group with semicolon : Use. You should try . Period instead. But it seems that you aren't owner since chmod falls – Yurij Dec 3 '18 at 16:24
  • I mean that windows folder where id_rsa is stored . What are the actual permissions for your files and bash console? – Yurij Dec 3 '18 at 16:38
  • what are the permision with getfacl of the file .ssh/id_rsa and the directory .ssh/ ? To understand how permission works see cygwin.com/cygwin-ug-net/ntsec.html – matzeri Dec 3 '18 at 17:30
  • @matzeri myuser/UsersGrp – vesperto Dec 10 '18 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.