title: Understanding sudo -E
body: <p>I wish to run TOMCAT with my current user's permissions, not the root's environment variables.</p>
  
  <pre><code>vagrant@dev:~/Workspace/eurekastreams$ echo $JAVA_OPTS
  -Xmx1024m -XX:MaxPermSize=128m -Dlog.home=/home/vagrant/Workspace/software/
  </code></pre>
  
  <p>I tried, <code>vagrant$&gt;sudo -E /etc/init.d/tomcat7 start</code>. </p>
  
  <p>However, my software is not logging to the /home/vagrant/Workspace/software directory, which means, I believe, that the JAVA_OPTS environment variable was not set.</p>
  
  <p>Am I understanding sudo -E correctly that it will perform a command with env vars of the current user?</p>