VirtualBox command works correct in bash, but does not work in nginx
<p>We have a project on nginx/Django, using VirtualBox.
When we try to run command <code>VBoxManage list runningvms</code> in nginx, we have the next error:</p>

<pre class="lang-none prettyprint-override"><code>Failed to initialize COM because the global settings directory '/.config/VirtualBox' is not accessible!
</code></pre>

<p>If we run this command in console, it works fine. </p>

<p>What can we do to make it working good in nginx?</p>

<p>Other details: 
nginx is runned by user "www-data", console - by the other user (Administrator).  </p>

<p>We have fixed the issue.</p>

<ol>
<li>There was wrong environment variable "Home" (os.environ['HOME']). We changed it, and so the problem was gone.  </li>
<li>Using Python API for VB instead of ssh can really help you with that problem, as <strong>RegularlyScheduledProgramming</strong> suggested - we added Python API too. </li>
</ol>

<p>Thanks!</p>

python django bash nginx virtualbox