Bug 2978 - download status file
Summary: download status file
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp (show other bugs)
Version: -current
Hardware: Other Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_1
  Show dependency treegraph
 
Reported: 2019-03-13 03:44 AEDT by vitalik_p
Modified: 2020-02-14 15:59 AEDT (History)
2 users (show)

See Also:


Attachments
Print "not modified" message when resumed transfer does not modify files (1.26 KB, patch)
2019-05-17 14:22 AEST, Damien Miller
dtucker: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vitalik_p 2019-03-13 03:44:51 AEDT
step to reproduce
1. download file from sftp server
$ echo -n "get file.txt"|sftp -a user@host -
Connected to user@host.
sftp> get file.txt
Resuming /home/user/file.txt to file.txt
/home/user/file.txt

2. check file with stat utility
$ stat file.txt
Access: 2019-03-12 18:25:30.326646411 +0200
Modify: 2019-03-12 18:25:30.328646433 +0200
Change: 2019-03-12 18:25:30.328646433 +0200

3. repeat step 1
$ echo -n "get file.txt"|sftp -a user@host -
Connected to user@host.
sftp> get file.txt
Resuming /home/user/file.txt to file.txt
/home/user/file.txt

4. check file with stat utility again
$ stat file.txt
Access: 2019-03-12 18:25:30.326646411 +0200
Modify: 2019-03-12 18:25:30.328646433 +0200
Change: 2019-03-12 18:25:30.328646433 +0200
file not modified!

expected results:
in step 3 suppress the output line
Resuming /home/user/file.txt to file.txt
or in some way show that file not modified?

Some times i need update files from server.
But not all files could be modified.
It will be nice to see what files really downloaded(or modified).
Comment 1 Damien Miller 2019-05-17 14:22:54 AEST
Created attachment 3284 [details]
Print "not modified" message when resumed transfer does not modify files

I guess we could do something like the attached: print a "not modified" message when a resumed transfer results in no file changes.

E.g.

$ ./sftp -D ./sftp-server
Attached to ./sftp-server.
sftp> lcd /tmp
sftp> get /bin/ls
Fetching /bin/ls to ls
/bin/ls                                       100%  132KB 161.8MB/s   00:00    
sftp> reget /bin/ls
Resuming /bin/ls to ls
/bin/ls                                       100%  132KB   0.0KB/s   00:00    
File "ls" was not modified
Comment 2 Damien Miller 2019-07-12 13:49:11 AEST
Patch applied and will be in OpenSSH 8.1 - thanks.
Comment 3 Damien Miller 2020-02-14 15:59:21 AEDT
Closing all resolved bug with release of openssh-8.2