0

I have set the owner of /home/jack/.ssh to the jack and also give it the permissions as follows:

-rw-------  1 jack jack 1679 Oct 10 01:41 id_rsa
-rw-------  1 jack jack  396 Oct 10 01:41 id_rsa.pub
-rwxrwx---+ 1 jack jack  884 Oct 10 01:48 known_hosts 
and 
drw------- 2 jack jack 4096 Oct 13 18:00 .ssh

but jack can not open /home/jack/known_hosts file. What is wrong with that?

Alex
  • 397
  • 3
  • 6
  • 18
  • 1
    See [How do directory permissions in Linux work?](http://unix.stackexchange.com/questions/21251/how-do-directory-permissions-in-linux-work) - in particular, the significance of the *execute bit* – steeldriver Oct 13 '15 at 23:56
  • Post the output of `ls -ld /home/jack /home/jack/.ssh` and `getfacl /home/jack/.ssh/known_hosts`. Can jack read other files in the same directory? Also copy-paste the exact command and the error message when you try to read the file. – Gilles 'SO- stop being evil' Oct 14 '15 at 22:36

1 Answers1

6

In short, as user jack run chmod u+x ~/.ssh. This will allow programs jack runs to be able to read files under the directory ~.ssh.

In an ls listing of a file, the x means you can execute or run the file, but for directories it means you can search the contents underneath.

rocky
  • 1,978
  • 11
  • 23