You are not logged in.

#1 2014-07-21 16:55:42

blueblob
Member
Registered: 2011-05-12
Posts: 22

sftp problems

I am having problems connecting with sftp, though ssh appears to be fine. I run arch on 2 boxes, and connect to a CentOS 6.X server. Both Arch boxes appear to have the same problem when connecting with the CentOS server and different error/warning when connecting to each other.

When I connect from my Arch laptop to my Arch desktop with ssh, I have no problems. When I connect with sftp, I get a warning message but it still works:

sftp lab
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Connected to lab.
sftp>

When connecting from either Arch machine to the CentOS machine, ssh works but sftp gives me an error:

sftp intuit
Connected to intuit.
Couldn't canonicalize: No such file or directory
Need cwd

Note that the parent directories have permissions 755 and in the case of the Arch->Arch is owned by my user, in the Arch->CentOS it's owned by root. The CentOS machine is mounted on a network share using autofs and nfs but I suspect that isn't the problem because I was able to sftp from it a few months ago (I don't regularly sftp so I don't know if I have updated to a newer version of openssh since the last time it worked).

ssh -vvvv intuit
...
Connected to intuit.
debug3: Sent message fd 3 T:16 I:1
Couldn't canonicalize: No such file or directory
Need cwd
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

debug1: fd 0 clearing O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Transferred: sent 4520, received 3224 bytes, in 0.1 seconds
Bytes per second: sent 65873.0, received 46985.5
debug1: Exit status 0

Current versions of openssh:

pacman -Q|grep ssh
libssh2 1.4.3-2
openssh 6.6p1-2

I am wondering if I have some sort of configuration problem and what other things I should try to get it to work.

The openSSH FAQ says I should get no output from the following command (but I do):

ssh intuit /bin/true
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Same output for other machine (with /usr/bin/true).

Offline

#2 2014-07-24 16:51:59

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: sftp problems

Do you have the same problems if you try sftp with a different client, such as Filezilla?

Offline

#3 2014-07-24 17:58:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: sftp problems

Are your user names the same on all of these systems?
Are the UIDs the same for your username on all these systems?
Do all of these systems have the same $HOME for your user name? 
Are they all mounted?

When you connect to a host, can you check on that host to find the owner of the sftp server process?  Is it your user? is it something else? Can that something else read the $HOME on that host?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB