title: Can't run uwsgi as root, "bind(): Permission denied"
body: <p>I try to configure uWsgi, Django ,Nginx with this document:
  <a href="http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html" rel="noreferrer">http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html</a></p>
  
  <p>Finish config the <code>uwsgi.ini</code> file, create a soft link at <code>/etc/uwsgi/vassals</code>.</p>
  
  <p>Failed at the last step :<strong>Make uWSGI startup when the system boots</strong>.</p>
  
  <p>When run this command:</p>
  
  <p><code>sudo /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data</code></p>
  
  <p>I got this error: </p>
  
  <pre><code>clock source: unix
  detected number of CPU cores: 1
  current working directory: /etc/uwsgi/vassals
  detected binary path: /usr/local/bin/uwsgi
  !!! no internal routing support, rebuild with pcre support !!!
  your processes number limit is 3813
  your memory page size is 4096 bytes
  detected max file descriptor number: 1024
  lock engine: pthread robust mutexes
  thunder lock: disabled (you can enable it with --thunder-lock)
  bind(): Permission denied [core/socket.c line 227]
  Tue May 27 05:29:26 2014 - [emperor] curse the uwsgi instance uwsgi.ini (pid: 1391)
  Tue May 27 05:29:29 2014 - [emperor] removed uwsgi instance uwsgi.ini
  </code></pre>
  
  <p>If I run this command without <code>sudo</code>, everything is OK.</p>
  
  <p>I've add user "kk" into group "www-data", and here is the <code>uwsgi.ini</code></p>
  
  <pre><code>[uwsgi]
  chdir           = /home/kk/XXXXXXX
  module          = wsgi
  home            = /home/kk/XXXXXXX
  
  master          = true
  processes       = 10
  socket          = /home/kk/XXXXXXX/mysite.sock
  chmod-socket    = 666
  vacuum          = true
  </code></pre>
  
  <p>I guess maybe I made mistake on file permission. Does anybody have good idea?Thank you.</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p>The official document is correct, I follow the steps to deploy the project in another new VPS, no error occurred.</p>