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

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

Closed
1 task done
pjpscriv opened this issue Apr 26, 2024 · 3 comments
Closed
1 task done

Comments

@pjpscriv
Copy link

pjpscriv commented Apr 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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
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 Apr 26, 2024

Use a Linux file path inside wsl for the config folder

@pjpscriv
Copy link
Author

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 🙏

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