title: Laravel: consulting queue failed because today's log file could not be opened
body: <h2>Why question is not a duplicate</h2>
  
  <p>"Laravel daily log created with wrong permissions" question is starting from a different situation. I already have user member of www-data and already my processes are running as www-data and not creating file as root or as different group. So suggested solution is not enough. </p>
  
  <p>Please, see my own answer to see the most simple solution to this <em>common</em> situation. </p>
  
  <hr>
  
  <p>My storage/logs directory is configured as</p>
  
  <pre><code>drwxrwsr-x  2 user www-data 4096 Aug 21 14:39 logs
  </code></pre>
  
  <blockquote>
    <p>Note the sticky bit</p>
  </blockquote>
  
  <p>Single log files are being created automatically as</p>
  
  <pre><code>-rw-r--r-- 1 www-data www-data 2381004 Aug 21 14:51 laravel-2019-08-21.log
  </code></pre>
  
  <p>Note, also, that my <code>user</code> is a member of group <code>www-data</code>.</p>
  
  <h2>The problem</h2>
  
  <p>accessing on ssh as <code>user</code> , I cannot run <code>php artisan queue:failed</code> because I got this error</p>
  
  <pre><code>   UnexpectedValueException  : The stream or file "/var/www/app/storage/logs/laravel-2019-08-21.log" could not be opened: failed to open stream: Permission denied
  
    at /var/www/app/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
      103|             }
      104|             restore_error_handler();
      105|             if (!is_resource($this-&gt;stream)) {
      106|                 $this-&gt;stream = null;
    &gt; 107|                 throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this-&gt;errorMessage, $this-&gt;url));
      108|             }
      109|         }
      110|
      111|         if ($this-&gt;useLocking) {
  </code></pre>
  
  <h2>Question</h2>
  
  <p>I cannot force server to create log file as <code>user:www-data</code></p>
  
  <p>But I need to be able to read <em>and_write</em> them. Or, at minimum, I need to able to run <code>queue:*</code> commands</p>
  
  <p>How should I fix this bad server config? </p>
  
  <blockquote>
    <p>I'm using Debian 10.0</p>
  </blockquote>