Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED][BUG] Permission errors upon new install of latest version (Raspberry Pi 4 / bullseye aarch64) #137

Closed
1 task done
ssj4maiko opened this issue Nov 15, 2023 · 3 comments

Comments

@ssj4maiko
Copy link

ssj4maiko commented Nov 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm currently using version 2.5.3. I recently tried to upgrade and it failed, it ended up reminding me why I had explicitly limited to this version, because newer ones were breaking.

I copied my docker-compose file from my working 2.5.3 version, just changing to "latest". The volume is also -test because I tried creating a new one from scratch before damaging my working one, and if I were to get it to work, I would be able to upgrade my main.

The yaml is specified below.

Also as a note, I'm running multiple containers for other services, and this has been running for many months (maybe it has completed a year already?), this means that, for the most part, I have docker running well and functional, so it's unlikely for there to be a problem there.

I have also tried both lscr.io/linuxserver/heimdall and linuxserver/heimdall just in case.

You can see the logs below.

Anyway, according to the errors errors, I surmised it is a permission error.
Originally, my main instance has a GUID of 100 and is working.
If I use id pi: gid=1000(pi), groups=1000(pi),<...>,100(users), in this one, I tried 100, 1000 and commenting the UIDs (defaults to 911, which does not exists in my id list), but all of them give the same problem.

I also deleted the config/ and logs/ folders after each try after I considered that maybe it could have some influence.


As an aside, I'm not sure if it may help finding the possible problem, when I tried to upgrade my main instance I was getting errors of failure to create symlinks and artisan not being found (logs below).

Expected Behavior

As I mentioned, my 2.5.3 is working fine, I wanted to update to a newer version, but like this, it's impossible.

Considering that most people must be using them fine, I'm guessing there could be something very specific that could be creating this problem, or maybe the instructions could be outdated.

Steps To Reproduce

$ save the docker-compose.yml below into its file
$ docker compose up
$ see it breaking down.

Environment

$ neofetch
OS: Debian GNU/Linux 11 (bullseye) aarch64 
Host: Raspberry Pi 4 Model B Rev 1.2 
Kernel: 6.1.21-v8+ 
Uptime: 52 days, 11 hours, 6 mins 
Packages: 678 (dpkg) 
Shell: bash 5.1.4 
Terminal: /dev/pts/0 
CPU: BCM2835 (4) @ 1.500GHz 
Memory: 1093MiB / 3794MiB 

Raspberry OS 64bit (I explicitly reinstalled everything to upgrade it many months ago because I had the older 32bit version, and it became incompatible with Nextcloud, so I explicitly have the 64bit version now.)

  • How docker service was installed:
$ systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-11-14 21:29:28 -03; 1h 14min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 822746 (dockerd)
      Tasks: 400
        CPU: 13min 7.340s
     CGroup: /system.slice/docker.service

CPU architecture

arm64

Docker creation

version: '3'
services:
  heimdall:
    container_name: heimdall-test
    image: lscr.io/linuxserver/heimdall:latest
    restart: unless-stopped
    ports:
      - "63640:443"
      - "9040:80"
    volumes:
      - (...)heimdall-test/config:/config
      - (...)heimdall-test/logs:/app/www/storage/logs
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Sao_Paulo
      - LOG_CHANNEL=null

Container logs

# CREATING A NEW INSTANCE
heimdall-test  | [migrations] started
heimdall-test  | [migrations] 01-nginx-site-confs-default: executing...
heimdall-test  | [migrations] 01-nginx-site-confs-default: succeeded
heimdall-test  | [migrations] 02-default-location: executing...
heimdall-test  | [migrations] 02-default-location: succeeded
heimdall-test  | [migrations] done
heimdall-test  | ───────────────────────────────────────
heimdall-test  | 
heimdall-test  |       ██╗     ███████╗██╗ ██████╗ 
heimdall-test  |       ██║     ██╔════╝██║██╔═══██╗
heimdall-test  |       ██║     ███████╗██║██║   ██║
heimdall-test  |       ██║     ╚════██║██║██║   ██║
heimdall-test  |       ███████╗███████║██║╚██████╔╝
heimdall-test  |       ╚══════╝╚══════╝╚═╝ ╚═════╝ 
heimdall-test  | 
heimdall-test  |    Brought to you by linuxserver.io
(... IDs and Key creation are all created successfully, below is where things fail.)
heimdall-test  | -----
heimdall-test  | New container detected, installing Heimdall
heimdall-test  | cp: cannot stat '/app/www/storage/app/searchproviders.yaml': No such file or directory
heimdall-test  | ln: failed to create symbolic link '/app/www/storage/app/public/avatars': No such file or directory
heimdall-test  | ln: failed to create symbolic link '/app/www/storage/app/public/backgrounds': No such file or directory
heimdall-test  | ln: failed to create symbolic link '/app/www/storage/app/public/icons': No such file or directory
heimdall-test  | rm: cannot remove '/app/www/storage/logs': Resource busy
heimdall-test  | ln: failed to create symbolic link '/app/www/app/SupportedApps': No such file or directory
heimdall-test  | ln: failed to create symbolic link '/app/www/database/app.sqlite': No such file or directory
heimdall-test  | cp: cannot stat '/app/www/storage/app/searchproviders.yaml.orig': No such file or directory
heimdall-test  | ln: failed to create symbolic link '/app/www/storage/app/searchproviders.yaml': No such file or directory
heimdall-test  | chown: cannot dereference '/app/www/.env': No such file or directory
heimdall-test  | **** Permissions could not be set. This is probably because your volume mounts are remote or read-only. ****
heimdall-test  | **** The app may not work properly and we will not provide support for it. ****
heimdall-test  | install: cannot stat '/app/www/.env.example': No such file or directory
heimdall-test  | Creating app key. This may take a while on slower systems
heimdall-test  | Could not open input file: /app/www/artisan
heimdall-test  | sed: /config/www/.env: No such file or directory
heimdall-test  | s6-rc: warning: unable to start service init-heimdall-config: command exited 1
heimdall-test  | /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
heimdall-test  | /run/s6/basedir/scripts/rc.init: fatal: stopping the container.
heimdall-test exited with code 0

UPDATING THE FUNCTIONAL 2.5.3 VERSION

Attaching to heimdall
heimdall  | [migrations] started
heimdall  | [migrations] 01-nginx-site-confs-default: skipped
heimdall  | [migrations] 02-default-location: skipped
heimdall  | [migrations] done
heimdall  | ───────────────────────────────────────
heimdall  | 
heimdall  |       ██╗     ███████╗██╗ ██████╗ 
heimdall  |       ██║     ██╔════╝██║██╔═══██╗
heimdall  |       ██║     ███████╗██║██║   ██║
heimdall  |       ██║     ╚════██║██║██║   ██║
heimdall  |       ███████╗███████║██║╚██████╔╝
heimdall  |       ╚══════╝╚══════╝╚═╝ ╚═════╝ 
heimdall  | 
heimdall  |    Brought to you by linuxserver.io
heimdall  | ───────────────────────────────────────
heimdall  | 
heimdall  | To support LSIO projects visit:
heimdall  | https://www.linuxserver.io/donate/
heimdall  | 
heimdall  | ───────────────────────────────────────
heimdall  | GID/UID
heimdall  | ───────────────────────────────────────
heimdall  | 
heimdall  | User UID:    1000
heimdall  | User GID:    100
heimdall  | ───────────────────────────────────────
heimdall  | 
heimdall  | using keys found in /config/keys
heimdall  | New container detected, installing Heimdall
heimdall  | cp: cannot stat '/app/www/storage/app/searchproviders.yaml': No such file or directory
heimdall  | ln: failed to create symbolic link '/app/www/storage/app/public/avatars': No such file or directory
heimdall  | ln: failed to create symbolic link '/app/www/storage/app/public/backgrounds': No such file or directory
heimdall  | ln: failed to create symbolic link '/app/www/storage/app/public/icons': No such file or directory
heimdall  | rm: cannot remove '/app/www/storage/logs': Resource busy
heimdall  | ln: failed to create symbolic link '/app/www/app/SupportedApps': No such file or directory
heimdall  | ln: failed to create symbolic link '/app/www/database/app.sqlite': No such file or directory
heimdall  | ln: failed to create symbolic link '/app/www/storage/app/searchproviders.yaml': No such file or directory
heimdall  | **** The following active confs have different version dates than the samples that are shipped. ****
heimdall  | **** This may be due to user customization or an update to the samples. ****
heimdall  | **** You should compare the following files to the samples in the same folder and update them. ****
heimdall  | **** Use the link at the top of the file to view the changelog. ****
heimdall  | ┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
heimdall  | │  old date  │  new date  │ path                                                                   │
heimdall  | ├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
heimdall  | │            │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
heimdall  | │ 2018-03-06 │ 2023-04-13 │ /config/nginx/site-confs/default.conf                                  │
heimdall  | │ 2022-08-20 │ 2023-08-13 │ /config/nginx/ssl.conf                                                 │
heimdall  | └────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
heimdall  | [custom-init] No custom files found, skipping...
heimdall  | crontab: can't open 'abc': No such file or directory
heimdall  | [ls.io-init] done.
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | [15-Nov-2023 00:53:57] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
heimdall  | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
heimdall  | Could not open input file: /app/www/artisan
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Nov 15, 2023

heimdall-test  | **** Permissions could not be set. This is probably because your volume mounts are remote or read-only. ****
heimdall-test  | **** The app may not work properly and we will not provide support for it. ****

@ssj4maiko
Copy link
Author

ssj4maiko commented Nov 15, 2023

I was going to say that none of the folders giving problems were part of my remote volumes, but you made me consider something, and I just tried and got it to work.

The problem was with the remote folder /app/www/storage/logs.

In short, I noticed that all problems seemed to happen inside the /app/www folder and its relatives, which shouldn't be affected by the very specific /app/www/storage/logs, but it seems I was wrong.

So although I could set it up once the image already existed, it seems it doesn't work anymore.

I included this folder because of the error logs that heimdall increasingly created and couldn't be turned off in any way (Laravel's environment variable LOG_CHANNEL=null should set it properly, but unfortunately, it wasn't used by heimdall), so I created this shortcut for me to delete the file as it would constantly fill up my previous raspberry when it had less memory.

I thought there would be no problems, but clearly, thinking again now that the problem is solved, if it creates this read-only remote folder before the application is installed, the folder that now already exists has wrong permissions, thus leading to the problems.

So yeah, solution is, do not add any remote folder from inside the application... At least I have a larger SD Card now, so it won't fill to 100% again.

@ssj4maiko ssj4maiko changed the title [BUG] Permission errors upon new install of latest version (Raspberry Pi 4 / bullseye aarch64) [SOLVED][BUG] Permission errors upon new install of latest version (Raspberry Pi 4 / bullseye aarch64) Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants