** Description changed: - The problem occurs always, but only with remote site reporting - wrong/broken file permissions: + Ubuntu: 14.04 LTS + The problem occurs always, but only with remote site reporting wrong/broken file permissions: sftp downloads files with those wrong permissions. The download succeeds, but to access the file, you have to chmod them. - Recursive downloads fail reproducibly. + Recursive downloads fail reproducibly. A workaround for a manual download could be to chmod the directories and try the command again, then chmod the downloaded tree again, try the download again, ... , until the download was successful. The remote site reports wrong permissions (no permission at all) for each directory and file. sftp takes these permissions for the download, even when it is not told to do so via option. As a result the downloaded directories have no write permissions and downloading the contained files fails. sftp> ls -l d--------- 32 0 0 8192 Sep 25 18:45 download - sftp> + sftp> sftp> get -r download/ Fetching /home/test/download/ to download Retrieving /home/test/download Retrieving /home/test/download/20140821 mkdir download/20140821: Permission denied Retrieving /home/test/download/20140826 mkdir download/20140826: Permission denied Retrieving /home/test/download/20140828 mkdir download/20140828: Permission denied Retrieving /home/test/download/20140902 mkdir download/20140902: Permission denied Retrieving /home/test/download/20140903 mkdir download/20140903: Permission denied Retrieving /home/test/download/20140904 mkdir download/20140904: Permission denied Retrieving /home/test/download/20140909 mkdir download/20140909: Permission denied Retrieving /home/test/download/20140910 mkdir download/20140910: Permission denied Retrieving /home/test/download/20140911 mkdir download/20140911: Permission denied Retrieving /home/test/download/20140916 mkdir download/20140916: Permission denied Retrieving /home/test/download/20140917 mkdir download/20140917: Permission denied Retrieving /home/test/download/20140918 mkdir download/20140918: Permission denied Retrieving /home/test/download/20140923 mkdir download/20140923: Permission denied Retrieving /home/test/download/20140925 mkdir download/20140925: Permission denied Retrieving /home/test/download/20140717 mkdir download/20140717: Permission denied Retrieving /home/test/download/20140722 mkdir download/20140722: Permission denied Retrieving /home/test/download/20140723 mkdir download/20140723: Permission denied Retrieving /home/test/download/20140729 mkdir download/20140729: Permission denied Retrieving /home/test/download/20140730 mkdir download/20140730: Permission denied Retrieving /home/test/download/20140731 mkdir download/20140731: Permission denied Retrieving /home/test/download/20140806 mkdir download/20140806: Permission denied Retrieving /home/test/download/20140807 mkdir download/20140807: Permission denied Retrieving /home/test/download/20140812 mkdir download/20140812: Permission denied Retrieving /home/test/download/20140814 mkdir download/20140814: Permission denied Retrieving /home/test/download/20140819 mkdir download/20140819: Permission denied Retrieving /home/test/download/20140820 mkdir download/20140820: Permission denied Retrieving /home/test/download/20140827 mkdir download/20140827: Permission denied Retrieving /home/test/download/20140924 mkdir download/20140924: Permission denied Retrieving /home/test/download/20140929 mkdir download/20140929: Permission denied Retrieving /home/test/download/20140724 mkdir download/20140724: Permission denied - sftp> + sftp> The directory has been created, but with empty permissions, thus downloading the content fails, because the local files/directories could not be created. mm@janus:~/download/download-test/test $ ll total 4 d--------- 2 mm mm 4096 Jul 25 13:41 download - mm@janus:~/download/download-test/test $ + mm@janus:~/download/download-test/test $ Expected behaviour: - sftp should use local umask or given umask for creating files and directories. + sftp should use local umask or given umask for creating files and directories. Only when it has been told to by option, it should set the remote permissions of directories and files, but only after their content has been downloaded, so that local files and directories can be created for download, even when the remote directory does not have write permission enabled. Thus it could even download and reproduce a directory tree without write permissions.
** Tags added: trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1374386 Title: sftp client stores files and directories with wrong permissions received by the server and lets download fail To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1374386/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs