SSH "PERMISSION DENIED" CUDA cross compiling to TX2

Hi,
I’ve seen similar pleas for help but none of the proposed solutions seem to help with my installation on Ubuntu 18.04.5. Whenever I click the run button on the Nsight toolbar, I get the following in the Nisght console window (this is the complete output):

Last login: Sat Feb 27 15:34:02 2021 from 10.0.0.38
echo $PWD’>’
/bin/sh -c “cd "/home/rusty/cdev/test4/Debug";export LD_LIBRARY_PATH="/usr/local/cuda-10.2/lib64":${LD_LIBRARY_PATH};export NVPROF_TMPDIR="/tmp";"/home/rusty/cdev/test4/Debug/test4"”;exit

rusty@apricot-flow:~$ /bin/sh -c “cd "/home/rusty/cdev/test4/Debug";export LD_LLIBRARY_PATH="/usr/local/cuda-10.2/lib64":${LD_LIBRARY_PATH};export NVPROF_TMPPDIR="/tmp";"/home/rusty/cdev/test4/Debug/test4"”;exit

/bin/sh: 1: /home/rusty/cdev/test4/Debug/test4: Permission denied
logout

LD_LIBRARY_PATH is set to the local cuda_10.2/lib64 path.
The local $PATH includes the ‘/bin/’ directory for CUDA.

Logging in as root in an SSH session and running the offending command line yields a different error: -bash: /bin/sh: Text file busy
BTW, although I found recommendations to use ‘root’ as login, it seems unlikely this is required because it’s too risky. I’ve also seen suggestions to “Synchronize” host and target. I’ve tried but no change in result (when the option is available, most of the time it’s not).

From the above, I have questions:

1.The Permission Denied seems to be triggered by
echo $PWD’>'/bin/sh -c
I don’t understand why it is called, this way, since all the following paths are exact.
2. Why is LD_LLIBRARY_PATH being set (in the second invocation) on the TX2 - is it supposed to be ‘LLIBRARY’ or ‘LIBRARY’?
3. Is there any way to edit the troublesome script?

Thanks in advance for your help,
Rusty

I was able to fix the problem by “never” choosing a “Local” build target (it is provided, by default and must be deleted in the target configuration step). Among other things, it adds the “Synchronize” options to the project context menu. “Synchronize All” will eliminate the “Permission Denied” error when Nsight is deploying the runtime to the target.
It doesn’t matter if a remote target is also selected (and detected) - that seems to be ignored at build time. Nothing goes right if the “Local target” option is ever selected and saved. I’ve found no option other than to start over with a clean, new project (your files can be reused, however).

Glad to know issue resolved, thanks for the update.

1 Like