Permission denied when pushing code

Spent a gazillion hours last night trying to fix the exact same problem and your solution is a life-saver. Thank you :smiley:

Next time someone has an issue, please log into the roboRIO run the following command and post the output here.

Log in as admin@roboRIO-<team#>-frc.local with putty or equivilent

Then, run

ls -lah /home/lvuser/

And post the results.

After updating the Eclipse plugins, we were broken again. Something, during the deploy process is TAKING AWAY the permissions for lvuser to the /home/lvuser/ folder. This happens during or before the “killall” command.

Our fix was to modify the build.xml file and add permissions back to the lvuser folder before the copy of the code over. Note that the user “admin” is used to add the permissions back, not “lvuser”

Here is a snippit of the build.xml. We added this part
<sshexec host="${target}"
command=“chmod 777 /home/lvuser”/>

    <sshexec host="${target}"
               command="killall -q netconsole-host || :"/>
**  	<sshexec host="${target}"
  	               command="chmod 777 /home/lvuser"/>
    <scp file="${wpilib.ant.dir}/robotCommand" todir="${username}@${target}:/home/lvuser/" password="${password}" trust="true"/>

I attached my build.xml file. (remove the .txt extension)

build.xml.txt (5.6 KB)

build.xml.txt (5.6 KB)

This partially worked for me. This exact placement did not resolve the Permission Denied, but moving the line to a diff spot in the .xml worked great.

BTW, for others: this .xml for me is in wpilib/cpp/current/ant

Many thanks for posting this fix.


I am now getting the Permission Denied feature when trying to deploy. Started today after I allowed eclipse to upgrade from to

I Tried “reverting” back in Eclipse.

I tried using FileZilla to allow all permissions to home/lvuser. My changes did not seem to stick.

I tried changing changing build.xml that is …wpilib\cpp\current\ant adding:

<sshexec host="${target}" command=“chmod 777 /home/lvuser” failonerror=“false” trust=“true” password="${password}" username=“admin”/>

at random locations.

I tried updating the firmware in the roboRio.

I did not feel comfortable that I did any of the above steps correctly, but I am still unable to deploy code.

I will try deploying with another computer this afternoon.

You may have to ssh to your roboRio first and issue the “chmod 777 /home/lvuser” to give permission to the folder, then run the modified build.xml. . After issuing the command you can do

ls -l /home/lvuser

and see if the permissions are “drwxrwxrwx” to see if your changes take.

Do you need step-by-step instructions on how to ssh to it? I use putty, a ssh client.

After doing that, try deploying again. Post the entire contents of your build log here.

Do you see se the extra chmod command in your build log?

Add exactly this (cut and paste)

<sshexec host="${target}"
command=“chmod 777 /home/lvuser”/>

Above the line
<scp file="${wpilib.ant.dir}/robotCommand" todir="${username}@${target}:/home/lvuser/" password="${password}" trust=“true”/>

Thanx Brian,

When I had previously tried to set permissions with filezilla, I had logged on as lvuser. It probably did not the right privileges. Logged on as admin and the permission changes stuck.

Added your “chmod 777” to build.xml and voila.

You will be receiving good karma credits.

I THINK THIS IS KEY. The computer that works and deploys code has MARS.1 installed ( The computer that started flaking out and throwing permission denied errors has MARS.2 (, which I installed shortly prior to this problem occurring.

I will use the build.xml hack in an emergency, but I hope the developers investigate this potential blar with Eclipse developers.

We’re seeing this same issue here at 116. I wiped out the updated Mars.1 eclipse and installed Mars.2 with the exact same results – permission denied. I still have the original Mars.1 install package. I’ll try that, but I suspect that it will work until the update rolls in.

Mike A.
FRC #116

I did put on updates and after that the error occurred. I thought it was just WPI plugins, but it looks like at some point between Feb 13 and Feb 29, the update also updated Eclipse to 4.5.2

I’m having the same problem. Everything worked previously when I had Mars 1 installed. Now I have Mars 2 and I can’t deploy code. I can’t actually say if that is the problem though.
I used PuTTY to ssh into the roboRIO, and I used the chmod command as explained on these threads. I then tried to deploy code - without resetting anything, but I got the error
…\wpilib.cpp\current\ant\buil.xml:78: server indicted an error: scp: /home/lvuser//robotCommand: Permission denied .

the results of the ls -lah /home/lvuser/ command show
admin@roboRIO-1138-FRC:~# ls -lah /home/lvuser/
total 10292
drw-r–r-- 4 lvuser ni 656 Mar 1 10:39 .
drwxr-xr-x 5 admin administ 416 Jun 5 2015 …
-rwxrwxrwx 1 lvuser ni 410 Apr 30 2015 .bashrc
-rwxrwxrwx 1 lvuser ni 152 Apr 30 2015 .profile
-rw-r–r-- 1 lvuser ni 10.0M Mar 1 10:39 FRCUserProgram
lrwxrwxrwx 1 admin ni 42 Dec 17 10:34 FRC_UserProgram.log -> /var/local/natinst/log/FRC_UserProgram.log
lrwxrwxrwx 1 admin ni 22 Dec 17 10:31 README_File_Paths.txt -> /README_File_Paths.txt
drwxrwxrwx 3 lvuser ni 232 Dec 17 10:34 frc
drwxrwxrwx 4 lvuser ni 296 Dec 17 10:35 natinst

I will try making the changes to the build.xml file, but I was expecting this to work at least the first time

I am so lost. Please help

log in with putty and issue the chmod 777 /home/lvuser/ command again. Then make the change to the build.xml file **before **trying to deploy code.

<sshexec host="${target}"
command=“chmod 777 /home/lvuser”/>

right before this line:
<scp file="${wpilib.ant.dir}/robotCommand" todir="${username}@${target}:/home/lvuser/" password="${password}" trust=“true”/>

OK, so based on the inputs from several on this thread, I’ve created a new build.xml that solves all of the permission problems and successfully deploys code from within Eclipse. I’ve attached it to this post.

Simply, copy the build.xml.txt file to:


(Make sure to substitute your user name and it should be build.xml – for some reason the formatting is inserting what looks like a space between the x and the ml)

And the deploy will start working again. This does 2 chmods and that seems to correct the problem until Brad & Co. can find the real fix.


Mike A.
FRC #116

build.xml.txt (5.8 KB)

build.xml.txt (5.8 KB)

We just published an update to the eclipse plugins, both the release and stable versions.

Can anyone with the problem with the C++ permissions please try to update your version of the eclipse plugins and verify that it’s working for you? If you could reimage the roboRIO just to make sure that everything is reset back to the way it should be that would be helpful. The new version copies some of the files to the roboRIO slightly differently than before.

FYI: there is also an updated C++ camera server class and the version number has been bumped up from 4 to 5. Otherwise this and the previous version should be the same.


Hi Brad,

Sorry, the fix didn’t seem to fix the problem. I’m using the Mars.2 release of Eclipse, BTW. Here’s the output of the “Run as” output:

Buildfile: C:\Users\mike\workspace-2016\ExampleBoard\build.xml
Trying to override old definition of task classloader
[echo] Trying Target: roboRIO-116-FRC.local
[echo] roboRIO found via mDNS
[echo] roboRIO image version validated
[sshexec] Connecting to roboRIO-116-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-116-FRC.local:22

C:\Users\mike\wpilib\cpp\current\ant\build.xml:67: server indicated an error: scp: /home/lvuser/FRCUserProgram: Permission denied

Total time: 5 seconds

Anything else you need to help debug the issue?


FRC #116


If the permissions were broken originally, the update likely won’t fix them. It should prevent it from happening in future deploys, but if /home/lvuser doesn’t have exec permissions currently, nothing in this update will fix it. Does manually running a chmod +x /home/lvuser as admin, then trying to redeploy fix it?

OK, if I manually chmod the /home/lvuser directory to 0777, then the new plug-ins work.

Next, I reformatted and reinstalled V19 firmware and then reloaded V 3.0.0F0 firmware on the RoboRIO. I then tried the deploy and everything seems to work. So, you need to make sure that the RoboRIO is back to a pristine state and the new plugins seem to work.

Good work gang!



Glad to hear it’s working for you now. There was a hiccup with the Java part of the install, something broke in our build, and a new version is posted that should fix that issue. Just waiting to hear some confirmation that everything is OK now.


Looks good, thanx