linuxserver / docker-smokeping

GNU General Public License v3.0
346 stars 95 forks source link

[BUG] File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it #174

Closed pjpscriv closed 6 months ago

pjpscriv commented 6 months ago

Is there an existing issue for this?

Current Behavior

When attempting to run the smokeping container on my 64-bit Windows 11 mini PC (full spec) through docker compose I get this error:

smokeping  | Connection to localhost (::1) 80 port [tcp/http] succeeded!
smokeping  | [ls.io-init] done.
smokeping  | ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
smokeping  | ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
smokeping  | ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
...

Visiting https://localhost:8080/smokeping shows the same error through the web UI:

image

Solutions Attempted

1. Change file access permissions on the host system

I tried modifying the windows security settings of D:\dev\smokeping\config\smokeping_secrets: Properties -> Security and Denying all permissions for the Everyone group as below:

image

This produced a new error:

smokeping  | Connection to localhost (::1) 80 port [tcp/http] succeeded!
smokeping  | [ls.io-init] done.
smokeping  | ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' does not exist
smokeping  | ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' does not exist
...

2. Change file access permissions inside the container

I then tried opening a terminal in the container and running a command found from a smokeping forum post working with the same error message. This didn't seem to have an impact on the file's access permissions.

Terminal commands / outputs:

PS D:\dev\smokeping> docker exec -it smokeping bash

root@797a1daff397:/# ls -l /etc/smokeping/smokeping_secrets 
lrwxrwxrwx 1 root root 25 Apr 26 16:42 /etc/smokeping/smokeping_secrets -> /config/smokeping_secrets
root@797a1daff397:/# chmod og-rw /etc/smokeping/smokeping_secrets
root@797a1daff397:/# ls -l /etc/smokeping/smokeping_secrets
lrwxrwxrwx 1 root root 25 Apr 26 16:42 /etc/smokeping/smokeping_secrets -> /config/smokeping_secrets

The same is true for trying to run chmod against /config/smokeping_secrets:

root@797a1daff397:/# ls -l /config/smokeping_secrets
-rwxr-xr-x 1 root root 57 Apr 26 15:14 /config/smokeping_secrets
root@797a1daff397:/# chmod og-rw /config/smokeping_secrets
root@797a1daff397:/# ls -l /config/smokeping_secrets
-rwxr-xr-x 1 root root 57 Apr 26 15:14 /config/smokeping_secrets 

3. Add a startup command to the docker-compose.yml

Then I tried adding the chmod command into the docker compose file using the command but I suspect I'm misusing this field.

    command: [ "chmod", "og-rw", "/etc/smokeping/smokeping_secrets" ]

And indeed this setup didn't work. The container simply stopped after some of the startup messages (IIUC because I'm overwriting the default startup command šŸ˜…).

smokeping  | [custom-init] No custom files found, skipping...
smokeping  | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.23.0.2. Set the 'ServerName' directive globally to suppress this message
smokeping  | Connection to localhost (::1) 80 port [tcp/http] succeeded!
smokeping  | [ls.io-init] done.
smokeping exited with code 0

Expected Behavior

Container start and run normally

Steps To Reproduce

  1. Create docker-compose.yml as documented
  2. Run docker compose up
  3. Observe errors documented in issue

Environment

- OS: Windows 11
- How docker service was installed: Docker desktop installer from [here](https://www.docker.com/products/docker-desktop/)

CPU architecture

x86-64

Docker creation

services:
  smokeping:
    image: linuxserver/smokeping:latest
    container_name: smokeping
    environment:
      - PUID=911
      - PGID=1001
      - TZ=Pacific/Auckland
    volumes:
      - "D:/dev/smokeping/config:/config"
      - "D:/dev/smokeping/data:/data"
    ports:
      - 8080:80
    restart: unless-stopped

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€

      ā–ˆā–ˆā•—     ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•—ā–ˆā–ˆā•— ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•—
      ā–ˆā–ˆā•‘     ā–ˆā–ˆā•”ā•ā•ā•ā•ā•ā–ˆā–ˆā•‘ā–ˆā–ˆā•”ā•ā•ā•ā–ˆā–ˆā•—
      ā–ˆā–ˆā•‘     ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•—ā–ˆā–ˆā•‘ā–ˆā–ˆā•‘   ā–ˆā–ˆā•‘
      ā–ˆā–ˆā•‘     ā•šā•ā•ā•ā•ā–ˆā–ˆā•‘ā–ˆā–ˆā•‘ā–ˆā–ˆā•‘   ā–ˆā–ˆā•‘
      ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•—ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•‘ā–ˆā–ˆā•‘ā•šā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā•”ā•
      ā•šā•ā•ā•ā•ā•ā•ā•ā•šā•ā•ā•ā•ā•ā•ā•ā•šā•ā• ā•šā•ā•ā•ā•ā•ā•

   Brought to you by linuxserver.io
ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€

To support LSIO projects visit:
https://www.linuxserver.io/donate/

ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€
GID/UID
ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€

User UID:    911
User GID:    1001
ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€

[custom-init] No custom files found, skipping...
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.19.0.2. Set the 'ServerName' directive globally to suppress this message
Connection to localhost (::1) 80 port [tcp/http] succeeded!
[ls.io-init] done.
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
ERROR: /config/Slaves, line 2: File '/etc/smokeping/smokeping_secrets' is world-readable or writable, refusing it
github-actions[bot] commented 6 months ago

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

aptalca commented 6 months ago

Use a Linux file path inside wsl for the config folder

pjpscriv commented 6 months ago

That did the trick! :) I was using Hyper-V. Switching to WSL removed the error and smokeping is now up and running and collecting data.

image

Thanks @aptalca šŸ™