Yacht icon indicating copy to clipboard operation
Yacht copied to clipboard

[Bug Report] Crash on multiple new installs due to bad Permissions

Open ssj4maiko opened this issue 2 years ago • 5 comments

I have recently learned about Yacht. I have a Raspberry Pi 4 which already has a couple applications (nginx with webdav, Pihole).

I installed Yatch, working, no problems. Got the templates, was able to install Navidrome, had some problems, but it was on that side (Had to add an env to change an optional conf), and I fixed it.

To Reproduce

However, installing Heimdall, Vaultwarden, and even normal MariaDB, all of them gave me Permission errors on logs.

Here is an example from Heimdall:

s6-supervise s6-linux-init-shutdownd: fatal: unable to iopause: Operation not permitted
s6-linux-init-shutdownd: fatal: unable to iopause: Operation not permitted
s6-linux-init-hpr: fatal: unable to reboot(): Operation not permitted
s6-svscan: warning: unable to iopause: Operation not permitted
s6-svscan: warning: executing into .s6-svscan/crash
s6-svscan crashed. Killing everything and exiting.

Here is for Vaultwarden:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', library/std/src/sys/unix/time.rs:353:62
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: tokio::time::driver::Driver<P>::new
   4: tokio::runtime::driver::Driver::new
   5: tokio::runtime::builder::Builder::build
   6: vaultwarden::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', library/std/src/sys/unix/time.rs:353:62
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: tokio::time::driver::Driver<P>::new
   4: tokio::runtime::driver::Driver::new
   5: tokio::runtime::builder::Builder::build
   6: vaultwarden::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Of course, this means that they're on an infinite loop of crashing.

I have tried deleting and remaking them, changing ports, changing template folders, giving 777 on the folders (shared volumes). Same thing.

Like with Navidrome, I imagined it could be a problem on the software at first, but considering permissions, I guessed Yacht would be the one with the way to resolve it.

Expected behavior To install and at least stabilize without an infinite loop of crashes

Raspberry Pi 4 (4GB)

  • OS: Raspberry OS
  • Version: v0.0.7-alpha-2022-07-27--05

ssj4maiko avatar Aug 31 '22 02:08 ssj4maiko

I think there's an issue with docker on a recent update. I am having the same issue, different os, and different containers. I will test and get back with you.

@SelfhostedPro any ideas I am experiencing the same.

wickedyoda avatar Aug 31 '22 03:08 wickedyoda

I did a little testing and it seems to have the "user: 1000:1000" in the docker run or docker-compose results in the error. From the best I can tell so far, it's not able to match the user ID to users on the host system. Try verifying the local user account such as root that you want the container running under and correcting the ID. One of my containers that had the issue was jellyfin, I was able to remove the line in the docker-compose and the container runs with no issues. Testing now with other containers.

wickedyoda avatar Sep 01 '22 17:09 wickedyoda

I'm pretty sure that my uid and guis are both 1000, that's what they id command gives me. I tried writing the following docker-compose.yml

version: '3.1'
services:
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    restart: unless-stopped
    user: 1000:1000
    environment:
      MARIADB_ROOT_PASSWORD: pass
    volumes:
      - /home/pi/mariadb:/config
    ports:
      - 3306:3306
    network_mode: bridge

I'm using mariadb simply because it's simple, and I'm using the image offered in yacht, rather than the official.

But it gave me the same errors, no difference at all.


But with the hint, I went to look after some specific errors I saw from mariadb, and found this: https://www.reddit.com/r/pihole/comments/tz1hf3/comment/i3w0uhb/

I did it, and after running mariadb again, it seems to have worked, so I will be testing the other images from scratch.

However, this error is specific to Raspberry OS's version change, so if the problem is also happening in other OS/processor and so on, it could be a hint.

ssj4maiko avatar Sep 02 '22 00:09 ssj4maiko

yeah, it seems that has solved my problem, vaultwarden was lacking a volume (/data) and no env file, giving me errors, but fixing them manually worked.

I could close the issue, but I'm not sure if you want to find some solution to your problem since it seems related, but I guess this is not a problem with Yacht itself.

ssj4maiko avatar Sep 02 '22 00:09 ssj4maiko

I'm gonna keep it open while I test a few things and document them. I'll close it when done.

wickedyoda avatar Sep 02 '22 02:09 wickedyoda