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?

2
  • 1
    See How do directory permissions in Linux work? - in particular, the significance of the execute bit Commented Oct 13, 2015 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. Commented Oct 14, 2015 at 22:36

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged .