hassio-addons icon indicating copy to clipboard operation
hassio-addons copied to clipboard

Permission denied

Open acesyde opened this issue 2 years ago • 6 comments

Hi,

On a new fresh installation of home assistant (supervised + odroid n2+)

I have this exception

In StreamHandler.php line 146:
                                                                               
  The stream or file "/var/www/localhost/heimdall/storage/logs/laravel.log" c  
  ould not be opened in append mode: failed to open stream: Permission denied

can you help me ?

acesyde avatar Apr 25 '22 13:04 acesyde

Never heard of this and currently don't have a way to reproduce. Can anybody confirm?

petersendev avatar May 17 '22 07:05 petersendev

Hi @petersendev

Full startup log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-ha-env: executing... 
[cont-init.d] 00-ha-env: exited 0.
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 02-tamper-check: executing... 
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing... 
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    1001
User gid:    1001
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing... 
[cont-init.d] 20-config: exited 0.
[cont-init.d] 20-folders: executing... 
[cont-init.d] 20-folders: exited 0.
[cont-init.d] 25-nossl: executing... 
No Home Assistant SSL certificates found, changing paths for self-generated certificates
[cont-init.d] 25-nossl: exited 0.
[cont-init.d] 30-keygen: executing... 
using keys found in /config/heimdall/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing... 
New container detected, installing Heimdall
Setting permissions
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing... 
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
In StreamHandler.php line 146:
                                                                               
  The stream or file "/var/www/localhost/heimdall/storage/logs/laravel.log" c  
  ould not be opened in append mode: failed to open stream: Permission denied  
                                                                               
In StreamHandler.php line 146:
                                                                               
  The stream or file "/var/www/localhost/heimdall/storage/logs/laravel.log" c  
  ould not be opened in append mode: failed to open stream: Permission denied  

acesyde avatar May 17 '22 07:05 acesyde

Never heard of this and currently don't have a way to reproduce. Can anybody confirm?

I can. Having same problem Permission denied:

s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
services-up: info: copying legacy longrun queue (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started
   UnexpectedValueException 
  The stream or file "/app/www/storage/logs/laravel-2023-01-25.log" could not be opened in append mode: Failed to open stream: No such file or directory
The exception occurred while attempting to log: The stream or file "/app/www/storage/logs/laravel-2023-01-25.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: copy(/app/www/.env): Failed to open stream: Permission denied
Context: {"exception":{}}
Context: {"exception":{}}
  at /app/www/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146
    142▕             restore_error_handler();
    143▕             if (!is_resource($stream)) {
    144▕                 $this->stream = null;
    145▕ 
  ➜ 146▕                 throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record));
    147▕             }
    148▕             stream_set_chunk_size($stream, $this->streamChunkSize);
    149▕             $this->stream = $stream;
    150▕         }
      +10 vendor frames 
  11  [internal]:0
      Illuminate\Foundation\Bootstrap\HandleExceptions::handleException()

Shultc avatar Jan 25 '23 20:01 Shultc

same, new install

cronner avatar Mar 23 '23 23:03 cronner

no solution yet?

cronner avatar Jul 13 '23 22:07 cronner

Same here, even when i set UID and GID to 0 for root or 3 and 4 for adm.

drumntetris avatar Sep 23 '23 09:09 drumntetris