Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8.3k views
in Java FTP by (460 points)
Hi,

I have set up the sftp between two unix machine and my client is running on one of the unix1 machine I want to connect to other unix2 machine using unix1 privatekey. Through command prompt I am able to login from unix1 to unix2. But when I run my application it is throwing the exception like

Caused by: java.io.FileNotFoundException: /home/vbb615c/.ssh/id_rsa (The file access permissions do not allow the specified action.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:135)
at java.io.FileInputStream.<init>(FileInputStream.java:95)
at com.enterprisedt.net.ftp.ssh.SCPClient.setAuthentication(Unknown Source)

But the file permissions on the .ssh folder is

drwx------ 2 vbb615c mqm 512 Jan 28 11:34 .ssh

files inside .ssh directory having below permissions.

-rw-r----- 1 vbb mqm 398 Jan 28 11:27 id_rsa.pub
-rw------- 1 vbb mqm 1743 Jan 28 11:27 id_rsa
-rw-r--r-- 1 vbb mqm 540 Jan 28 11:28 known_hosts
-rw------- 1 vbb mqm 397 Jan 28 11:34 authorized_keys

Let me know where I am doing wrong.

3 Answers

0 votes
by (162k points)
The directory is owned by vbb615c, but the file is owned by vbb

Maybe make sure the dir owner & file owner are the same, and that your app runs as that user.
0 votes
by (460 points)
The directory is owned by vbb615c, but the file is owned by vbb

Maybe make sure the dir owner & file owner are the same, and that your app runs as that user.


I have just modified the log like vbb instead of vbb615c.
0 votes
by (162k points)
I'm not sure what you mean ... have you changed the ownership of the directory to that of the file?

Categories

...