Deploy Error... Permission denied

Using Eclipse c++.
Getting Permission Denied while trying to deploy code.

The following has happenned consistently 5 times.

  1. Load firmware on RoboRIO
  2. Image the RoboRIO
  3. Deploy code. The first time I deploy code I get the following. Every time after the first time I get the error down lower in this msg.

Buildfile: C:\Users\FRC-2637\workspace\StrongholdFinal_Without_NavX\build.xml
Trying to override old definition of task classloader
get-target-ip:
[echo] Trying Target: roboRIO-2637-FRC.local
[echo] roboRIO found via mDNS
dependencies:
[echo] roboRIO image version validated
deploy:
[sshexec] Connecting to roboRIO-2637-FRC.local:22
[sshexec] cmd : rm -f /home/lvuser/FRCUserProgram
[echo] [athena-deploy] Copying code over.
[scp] Connecting to roboRIO-2637-FRC.local:22
[scp] done.
[sshexec] Connecting to roboRIO-2637-FRC.local:22
[sshexec] cmd : killall -q netconsole-host || :
[scp] Connecting to roboRIO-2637-FRC.local:22

BUILD FAILED
C:\Users\FRC-2637\wpilib\cpp\current\ant\build.xml:78: server indicated an error: scp: /home/lvuser//robotCommand: Permission denied

Total time: 6 seconds


Every subsequent deploy after the first deploy gives me the following


Buildfile: C:\Users\FRC-2637\workspace\StrongholdFinal_Without_NavX\build.xml
Trying to override old definition of task classloader
get-target-ip:
[echo] Trying Target: roboRIO-2637-FRC.local
[echo] roboRIO found via mDNS
dependencies:
[echo] roboRIO image version validated
deploy:
[sshexec] Connecting to roboRIO-2637-FRC.local:22
[sshexec] cmd : rm -f /home/lvuser/FRCUserProgram
[sshexec] Could not chdir to home directory /home/lvuser: Permission denied
[sshexec] rm: can’t stat ‘/home/lvuser/FRCUserProgram’: Permission denied
[sshexec] Remote command failed with exit status 1
[echo] [athena-deploy] Copying code over.
[scp] Connecting to roboRIO-2637-FRC.local:22

BUILD FAILED
C:\Users\FRC-2637\wpilib\cpp\current\ant\build.xml:67: com.jcraft.jsch.JSchException: Could not send ‘C:\Users\FRC-2637\workspace\StrongholdFinal_Without_NavX\Debug\FRCUserProgram’ to ‘/home/lvuser’ - 3: Permission denied

Total time: 3 seconds

Any thoughts, please???

See http://www.chiefdelphi.com/forums/showthread.php?threadid=141710.

This is now officially NOT an isolated incident. I’ve read of at least 4 different individuals reporting permission denied deploy errors. I observed that all threads seem to have originated AFTER the last release of WPILib for C++…

To anyone who had or still has these problems, please post in this forum - http://forums.usfirst.org/showthread.php?24812-C-Permission-Denied-During-Deploy&p=98740#post98740 appealing for assistance from developers.

See http://forums.usfirst.org/showthread.php?24812-C-Permission-Denied-During-Deploy&p=98745#post98745 for how we worked around it.

Yes, I have successfully worked around this issue by putting a chmod in our build.xml.

However, this is just not right. This is a dangerous way to fix this and leaves us vulnerable if we were to need to reinstall, etc. But we are up and that is good.

It is just a same to spend so many hours chasing this and I’m interested to know what is the underlying cause of this.

I agree completely - I’d like the NI/WPILib people to at least investigate what might be causing this to occur and publish an endorsed method of dealing with the problem should it occur. If this happens to someone while at an event…

If it makes you feel better, we have been talking about you, just not to you. We are engineers too, after all.

I had something similar happen to me during the beta, but I think I caused it by putting some things on the target using ftp and having a folder owned by admin that wouldn’t allow other tools to write to their normal location.

Brad is looking to see if the tools may be creating something like this.

If you see the situation again and want to do some sleuthing, shell in and run the following…

find /home/lvuser ! -user lvuser -print

This will show all files under lvuser that are not owned by it. I have two files like that on my roboRIO, but nothing concerning. A directory could really foul up a deployment, and that would help the Eclipse-meisters know where to start looking. And that presumably is what you would chown to lvuser in order to get around it.

Greg McKaskle

Greg, I will try this out tomorrow. I didn’t attend today’s meeting but as of Sunday night my Permission denied problem was hard and reproducible. So I’ll try this dump and see what we’ve got.

Thanks, Clark