This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244116

Summary: Wrong PATH environment in user profile should not break remote
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: RemoteAssignee: Vladimir Kvashin <vkvashin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Kvashin 2014-04-28 05:49:44 UTC
Jean complained that IDE shows error message 
".../OracleSolarisStudio-Linux-x86/welcome_9 does not exist or is not an executable"

Investigation shows that she has wrong PATH setting on remote host, so "test" command that was used for verification was launched from a wrong place and just crushed.

On most systems, test utility resides in /usr/bin, but there is no guarantee that it's true. In particular, on our Mac installation, I found it in /bin, but not in /usr/bin.

And IDE has some more places where short command names are used. 
I found more than 20 places with commands
uname, mktemp, test, ls, chmod, sh, mv, mkdir, find, zip
withot full paths.

Solution should be: introduce an API/SPI that returns full path for standard commands like ones listed above.
Comment 1 Quality Engineering 2014-05-08 02:13:11 UTC
Integrated into 'main-silver', will be available in build *201405080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1314175bfb47
User: Maria Dalmatova <mromashova@netbeans.org>
Log: part fix of bz#244116 Wrong PATH environment in user profile should not break remote
use HostInfoUtils.serachFile to run file with the absoulte path,
current changes addes /usr/bin and /bin as first candidates but leave possibility to use test from the PATH (if there is no test in /usr/bin and /bin) but we can forbid using PATH at all and use only pre-defind serach paths for the utilities we use, such as /usr/bin, /bin, /usr/local/bin
Comment 2 Quality Engineering 2014-06-04 15:25:37 UTC
Integrated into 'releases/release80', will be available in build *201406041415* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/0a4128a1f953
User: Maria Dalmatova <mromashova@netbeans.org>
Log: part fix of bz#244116 Wrong PATH environment in user profile should not break remote
use HostInfoUtils.serachFile to run file with the absoulte path,
current changes addes /usr/bin and /bin as first candidates but leave possibility to use test from the PATH (if there is no test in /usr/bin and /bin) but we can forbid using PATH at all and use only pre-defind serach paths for the utilities we use, such as /usr/bin, /bin, /usr/local/bin
(transplanted from 1314175bfb47f86ffad08edca959b6ee5b21a2ab)
Comment 3 Vladimir Kvashin 2015-04-08 21:48:28 UTC
The bug title and description sounds right, but is too generic. Known particular problems are fixed.