 <p>The line in your gunicorn configuration file</p> <pre><code>user = newuser </code></pre> <p>does appear to be the central problem. As is sorta shown by</p> <pre><code>$ id uid=1001(msw) gid=1001(msw) groups=1001(msw),4(adm),8(mail) … </code></pre> <p>A user has one uid and one gid. All other groups listed are groups that you belong to but are not your gid. To change the gid you have to explicitly ask for it to be switched as in:</p> <pre><code>$ newgrp mail $ id uid=1001(msw) gid=8(mail) groups=1001(msw),4(adm),8(mail) … </code></pre> <p>does change my gid to one of my other groups. Unfortunately newuser probably now looks like:</p> <pre><code> $ id uid=22(newuser) gid=22(newuser) groups=22(newuser), 455(giri26) … </code></pre> <p>and since newuser might never log in to a shell nor even have a password, there is no good place to run newgrp. </p> <p>To fix it, you should make giri26 the gid of newuser by modifying <code>/etc/passwd</code></p> <pre><code>newuser:x:22:22: … </code></pre> <p>becomes:</p> <pre><code>newuser:x:22:455: … </code></pre> <p>This could have effects on newuser's other files and directories, be wary.</p>