title: Nginx worker process cant access config.ru
body: <p>I have set up my RoR app on DO Ubuntu x64. On <code>Nginx port 8080</code>.</p>
  <p>My config:</p>
  <pre><code>server {
    listen 8080;
   # server_name www.mydomain.com;
    passenger_enabled on;
    passenger_app_env development;
    root /home/edgars/Proj/public;
  }
  </code></pre>
  <p>In Nginx log file error:</p>
  <pre><code>Cannot stat '/home/edgars/Proj/config.ru; This error means that the Nginx worker process (PID 18065, running as UID 33) does not have permission to access this file.
  </code></pre>
  <p>As my research from <a href="https://stackoverflow.com/questions/25774999/nginx-stat-failed-13-permission-denied">this</a> question shows I need to ensure that Nginx user can access that path.</p>
  <pre><code>sudo -u www-data cd /edgars
  </code></pre>
  <p>got error :<code>sudo: cd: command not found</code></p>
  <pre><code>sudo gpasswd -a www-data edgars
  </code></pre>
  <p>got : Adding user www-data to group edgars</p>
  <p>But still I cant fix that error.</p>
  <p>Any other workaround ?</p>
  <p>Thanks in advance.</p>