Permission denied when remote debugging on TK1

Trying to compile from a ubuntu 12.04 release to run code using Eclipse Nsight edition on the TK1.
Followed instructions here:
http://devblogs.nvidia.com/parallelforall/remote-application-development-nvidia-nsight-eclipse-edition/

It seems you need to specify a target directory on the TK1 in the configuration. I selected myCudaSamples, which I’d created from the script which copies the cuda samples to a user directory.

Initially it complained ‘Debug’ directory did not exit, and then ‘test’ under the ‘Debug directory’.
I manually created both directories using the ‘ubuntu’ default account. The directories allow rwx for everyone.
I’m also logging in with the default ‘ubuntu’ account.
The error shown in the console window of Nsight Eclipse edition is as follows

Last login: Thu Feb 3 00:02:24 2000 from 192.168.1.201
echo PWD'>' /bin/sh -c "cd \"/home/ubuntu/myCudaSamples/Debug\";export LD_LIBRARY_PATH=\"/usr/local/cuda/lib\":\${LD_LIBRARY_PATH};\"/home/ubuntu/myCudaSamples/Debug/test\"";exit ubuntu@tegra-ubuntu:~ echo PWD'>' /home/ubuntu> ubuntu@tegra-ubuntu:~ /bin/sh -c “cd “/home/ubuntu/myCudaSamples/Debug”;expor t LD_LIBRARY_PATH=”/usr/local/cuda/lib":${LD_LIBRARY_PATH};"/home/ubuntu/myC udaSamples/Debug/test"";exit
/bin/sh: 1: /home/ubuntu/myCudaSamples/Debug/test: Permission denied
logout

This is not very helpful as it’s not clear what the permission denied error is from. Also there is no explaination or list of command Nsight Eclipse edition runs in order to copy the executable to the TK1 target and run it there.

Any ideal what permission issue it’s failing on?

Permission denied probably comes from not using root. Did you run it as root?

Run what exactly as root? I tried running nsight as a root user and it made no difference. I would not really expect it to, as I suspect you’re suggesting I run the command on the TK1 with root permission. As I can’t see the script being used on Eclipse or even the commands being run I can’t modify them to use root. As I understand it the ubuntu account is defined as root on the TK1.

ubuntu is administrator, by default it has no root privileges. You may want to change the owner to ubuntu, if thats the problem

I have same problem. Is there a solution ?

I have the same but not solved/(ㄒoㄒ)/~~

If ssh is involved then you might need to provide a mechanism for showing password prompts when sudo has to be used (see “man ssh”, search for “askpass”). There are different askpass programs around…my host has KDE so I use “ksshaskpass”. As mentioned above though, if the file in question can be directly used by your user, then no sudo would be required and it might solve the issue.

Can u share your email to me? Thx

It might be useful to summarize some information on this topic. You have a user name on your host of which your debug tools run (presumably nsight eclipse is your debug tool)…there is a user name nsight logs in as when it talks to the Jetson…probably “ubuntu”. On the Jetson some commands require running as root…implying running under user “ubuntu”, but with “sudo” to assume root privileges.

If the command fails on the host, this would be a matter of host side configuration…likely you can ignore this, it’s only after reaching the Jetson that the command is rejected. I think login succeeded, but the command issued was denied (it is important to know what command or nsight action was denied).

Was nsight set up to access user ubuntu? Can you manually ssh to user ubuntu on the command line? If so, then it isn’t an issue of getting to that user for basic use.

Once you are logged in to that user, if you were to manually do what nsight is trying to do, can you succeed on the ssh command line to do this? Does manual command line execution require sudo? Probably.

Now if the command you are running is intended to provide a graphical display, then you have two more sets of permissions to worry about. The first is that you have to have the DISPLAY environment variable set to where you want the window to display, and if not set up correctly, this might give permission denied. The second is that if you do remote display, then the graphical part of the program is actually offloaded to the machine doing the display…e.g., if running OpenGL then the OpenGL libs on the machine actually doing the display have to be executable by your user on that machine…overall there are a lot of complicated details of how permissions might fail.

Please post as much information as possible about about whether manual ssh usage works; add what you can about what commands are being run and where any GUI application might need to be displayed, e.g., run on Jetson but displayed on host (you might not be able to test everything, but however much you can verify will help). Right now there simply isn’t enough information to zero in on which permission the system is talking about. All of the above possibilities are a bit overwhelming…this is why more information is needed.

I’m tring to use QT instead of the eclipse…:(,could u give me a better method to debug in the TX1 itself?

Are you getting a permission denied error? Personally I usually just use command line gdb.

I am using JetsonTk1 kit.
I am also facing the same problem from long time.
When I am running the CUDA Sample Program. I am getting this error:

Last login: Sat Jan 1 07:46:20 2000 from 192.168.1.7
echo PWD'>' /bin/sh -c "cd \"/home/ubuntu\";\"/home/ubuntu/testProgram\"";exit ubuntu@tegra-ubuntu:~ echo PWD'>' /home/ubuntu> ubuntu@tegra-ubuntu:~ /bin/sh -c “cd “/home/ubuntu”;”/home/ubuntu/testProgra m"";exit
/bin/sh: 1: /home/ubuntu/testProgram: Permission denied
logout

Please tell me how can I fix it.

Are you running the command directly on the Jetson? If so, it should work. If not, then the issue is either that the user running the command on the Jetson does not have permission, or the remote display is not set up correctly (the graphical display part of the program offloads to the remote machine and Jetson would no longer do that part of the program).

It is always a good idea when failing remote display to see what happens to the same command run locally from the Jetson. This lets you differentiate between whether the failure is a remote display failure versus a requirement on the Jetson itself. Always note whether sudo was required.

I am running CUDA Sample programs on Host computer and trying to deploy the program into Jetson TK1 using Nsight Eclipse Edition from Host Computer. Both system are running with linux 14.04 OS.
I followed each and every step explained in the link given bellow.

When I am compiling CUDA sample Programs I am getting same Error. PERMISSION DENIED
I don’t understand what are you talking about remote display failure…
Can you please refer any document or video which can help me to run CUDA Sample programs using Nsight Host Computer…
Please help me.

I’m not up on all of the possible nsight issues, but do know that the user running the CUDA program must have access to the GPU device special file…this is done by putting the user in group “video”. Sometimes there is a prompt for sudo when doing things remotely, and if you haven’t set up an askpass mechanism (see “man ssh”), then you’ll never know you were prompted.

It sounds like you are starting the program on the Jetson indirectly via nsight login to the Jetson. If the DISPLAY environment variable is not correct it won’t try to display where you think it will, and you’ll also get a permission denied. What user are you logging in as? Is the DISPLAY environment variable set up (needed cause you are not logging in directly at the Jetson GUI…check the output of “echo $DISPLAY”)?

@jvd using my method …

@saien No, not yours. I am using NVIDIA Nsight Eclipse Edition to run CUDA Sample Programs instead of QT.

but it has the problem …do u solve it?

@saien Yes, The actual problem was the SYNCHRONIZATION between the Host and Jetson TK1 Device. I synchronized both of the devices and the problem was solved…

@jvd could u share the method aimed it?