Bug 244417 - [ssh] Remote copy fails without notice if only sftp is enabled (but shell access is denied)
Summary: [ssh] Remote copy fails without notice if only sftp is enabled (but shell acc...
Status: NEW
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 155189 236334
  Show dependency tree
 
Reported: 2008-08-18 07:56 EDT by Glen A. CLA
Modified: 2012-11-19 04:56 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glen A. CLA 2008-08-18 07:56:48 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. Log in to a server with an account that does not have SSH access.
2. Attempt to copy a file from one location on the server to another.
3. Progress dialog is displayed, etc., but the file is not copied, and there are no error messages displayed/logged.

More information:
Newsgroup link: http://www.eclipse.org/newsportal/article.php?id=449&group=eclipse.dsdp.tm

As explained by Martin, SFTP doesn't support remote file copying, and therefore falls back to an SSH 'cp' command.

As suggested by Martin, if no SSH access is permitted, RSE could download the file and then upload it to the target directory (using SFTP).

At a minimum, an error message should be displayed explaining what the problem is, or the 'Paste' context menu item on remote folders could be disabled if the clipboard held a reference to a remote file (though I prefer Martin's suggestion).
Comment 1 Martin Oberhuber CLA 2008-08-18 08:55:17 EDT
Updated summary, previous value was:
SFTP remote copy falls back to SSH – SSH access not enabled on account
Comment 2 Martin Oberhuber CLA 2008-08-18 08:57:00 EDT
We should catch the exception and file a proper error message at the least. The error should tell users to manually download / upload the resources.

A better solution would be to fall back to automatic download / upload like the EFS provider does.
Comment 3 Martin Oberhuber CLA 2008-09-23 12:12:29 EDT
Note that the FTPService also provides an implementation of recursive-copy and recursive-delete, which could be used here. We should consider putting this algorithm into the FileServiceSubSystem such that it can be re-used if needed - a simpler implementation could just copy the algorithm into SftpFileService.

In the FileServiceSubSystem, we could catch something like UnsupportedOperationException in case of copying / deleting a non-empty folder, in order to trigger the algorithm.

In either case, the service should cache the fact that remote ssh shell is not available, and directly trigger the alternative algorithms if needed. In some cases, it could also be a user preference (see also bug 155189).

We'd appreciate if somebody in the Community would want to take a look at this.
Comment 4 Martin Oberhuber CLA 2010-02-26 19:09:33 EST
Bulk update of target milestones to 3.2
Comment 5 Martin Oberhuber CLA 2011-05-31 17:48:07 EDT
Bulk moving 3.3 deferred items to 3.3.1