【发布时间】:2015-03-29 05:17:27
【问题描述】:
我正在使用 SFTP 和公钥为非 root 用户发送文件,看起来文件已发送,但我无法在目标文件夹中找到它,可能是由于权限。
sftp> ls
sftp> put /tmp/testx
Uploading /tmp/testx to /folder1/target_folder
/tmp/testx 100% 5 0.0KB/s 00:01
sftp> get testx
Couldn't stat remote file: No such file or directory
File "/folder1/target_folder/testx" not found.
sftp> ls
sftp>
这里是 -vvv :
debug3: SSH_FXP_REALPATH . -> /folder1
debug3: Looking up /tmp/file_to_send
debug3: Sent message sender_host 4 T:17 I:2
debug3: Wrote 80 bytes for a total of 2653
debug3: Received stat reply T:105 I:2
debug3: Sent message SSH2_FXP_OPEN I:3 P:/folder1/target_directory/file_to_send
debug3: Wrote 112 bytes for a total of 2765
debug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:6206
debug3: Wrote 6288 bytes for a total of 9053
debug3: SSH2_FXP_STATUS 0
目标目录
drw-rw-rw- 1 0 0 target_directory
如何确保文件在没有服务器访问的情况下交付?
【问题讨论】:
-
您使用命令行工具而不是直接实现协议并提供有关其处理服务器提供的错误消息的书面保证的客户端库是否有特殊原因?