View Single Post
  #23   Spotlight this post!  
Unread 02-28-2016, 03:25 PM
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 357
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: Permission denied when pushing code

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}"
username="admin"
password="${password}"
trust="true"
failonerror="false"
command="chmod 777 /home/lvuser"/>





Code:
    <sshexec host="${target}"
               username="admin"
               password="${password}"
               trust="true"
               failonerror="false"
               command="killall -q netconsole-host || :"/>
  	
  	<sshexec host="${target}"
  	               username="admin"
  	               password="${password}"
  	               trust="true"
  	               failonerror="false"
  	               command="chmod 777 /home/lvuser"/>

    <scp file="${wpilib.ant.dir}/robotCommand" todir="${username}@${target}:/home/lvuser/" password="${password}" trust="true"/>
__________________
Brian K
Team 1225 Robotics Mentor

Last edited by SuperBK : 02-28-2016 at 11:10 PM.
Reply With Quote