+++ This bug was initially created as a clone of Bug #1163050 +++ Description of problem: create a app and try to rhc ssh the app with a wrong execute path by using --ssh parameter (eg: rhc app ssh -a existapp --ssh /etc/init.d/), just exception log output. login in the system use root. Version-Release number of selected component (if applicable): devenv_5293 rhc 1.32.1 How reproducible: Always Steps to Reproduce: 1. Create an app $ rhc app create push1 jboss-unified-push-1 2. Ssh the app with exist directory Actual results: # rhc app-ssh -a push1 --ssh /etc/init.d/ Connecting to 546313da6cec0e1994000e17.rhcloud.com ... /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/lib/rhc/commands/ssh.rb:45:in `exec': Permission denied - /etc/init.d/ (Errno::EACCES) from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/lib/rhc/commands/ssh.rb:45:in `run' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/lib/rhc/commands.rb:294:in `execute' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/commander-4.2.1/lib/commander/command.rb:180:in `call' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/commander-4.2.1/lib/commander/command.rb:180:in `call' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/commander-4.2.1/lib/commander/command.rb:155:in `run' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/commander-4.2.1/lib/commander/runner.rb:419:in `run_active_command' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/lib/rhc/command_runner.rb:72:in `run!' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/commander-4.2.1/lib/commander/delegates.rb:12:in `run!' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/lib/rhc/cli.rb:37:in `start' from /usr/local/rvm/gems/ruby-1.9.3-p550/gems/rhc-1.32.0/bin/rhc:20:in `<top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p550/bin/rhc:23:in `load' from /usr/local/rvm/gems/ruby-1.9.3-p550/bin/rhc:23:in `<main>' from /usr/local/rvm/gems/ruby-1.9.3-p550/bin/ruby_executable_hooks:15:in `eval' from /usr/local/rvm/gems/ruby-1.9.3-p550/bin/ruby_executable_hooks:15:in `<main>' Expected results: Additional info: Reference : https://bugzilla.redhat.com/show_bug.cgi?id=978837 --- Additional comment from Vu Dinh on 2015-11-14 23:31:54 EST --- This PR <https://github.com/openshift/rhc/pull/728> is submitted to fix this bug. --- Additional comment from openshift-github-bot on 2015-11-17 10:34:29 EST --- Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/33de65a472561fe11e93fc638c5da7b05a010bfd Bug 1163050 - Fix exception using rhc app ssh --ssh with custom path The rhc app ssh --ssh with custom and exist path fails due to lacking of checking whether the path is a readable file or not. This commit modifies check_ssh_executable? method to check if the path is a readable file or not and it no longer accepted directory as a valid input. A exception is raised in case of unreadable/non existent file or directory is provided. Bug 1163050 Link <https://bugzilla.redhat.com/show_bug.cgi?id=1163050> Signed-off-by: Vu Dinh <vdinh>
Reproduced the bug on rhc-1.37.1.2-1.el6op.noarch. Verified on rhc-1.38.4.2-1.el6op.noarch Steps to verify: 1.Create an app. # rhc app create ruby1 ruby-1.9 2.Ssh the app with existing but wrong directory. It will return gracefull error: # rhc ssh ruby1 --ssh /etc/init.d/ SSH executable '/etc/init.d/' is not a regular file. 3.Ssh the app after set "ssh=/etc/init.d/" in ~/.openshift/express.conf.It will return gracefull error: # rhc ssh ruby1 SSH executable '/etc/init.d' is not a regular file. 4.Ssh the app with the right directory. # rhc ssh ruby1 --ssh /usr/bin/ssh Connecting to domzyp-ruby1-1.com.cn .. ...... [ruby1-domzyp.ose22-auto.com.cn domzyp-ruby1-1]\> ls app-deployments app-root git ruby The bug has been fixed, so move it to Verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2666.html