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] Permissions of Influxdb folder do not follow PUID/PGID set in the docker-compose file #362

Open
garret opened this issue Aug 17, 2022 · 5 comments · May be fixed by #390
Open

[BUG] Permissions of Influxdb folder do not follow PUID/PGID set in the docker-compose file #362

garret opened this issue Aug 17, 2022 · 5 comments · May be fixed by #390
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@garret
Copy link

garret commented Aug 17, 2022

I ran scrutiny with such docker-compose scheme on my raspberry pi 4b (4GB):

    scrutiny:
        cap_add:
            - SYS_RAWIO
        ports:
            - 8123:8080
        environment:
            - PUID=${PUID}
            - PGID=${PGID}
            - TZ=${TIMEZONE}
        volumes:
            - /run/udev:/run/udev:ro
            - ${CONFIG_FOLDER}/scrutiny/config:/opt/scrutiny/config
            - ${CONFIG_FOLDER}/scrutiny/influxdb:/opt/scrutiny/influxdb
        devices:
            - /dev/sdb
        container_name: scrutiny
        restart: unless-stopped
        image: ghcr.io/analogj/scrutiny:master-omnibus

Since it was introduced the influxdb database I now encounter the issue that the /opt/scrutiny/influxdb folder is not locally saved after my PUID and PGID settings (set in an .env file next to my docker-compose file). That is not the case for the /opt/scrutiny/config folder which instead respects the PUID and PGID settings.

I tried adding user: ${PUID}:${PGID} in the docker-compose but in that way scrutiny does not event start.

Do you know how to solve such issue?

@garret garret added the bug Something isn't working label Aug 17, 2022
@AnalogJ
Copy link
Owner

AnalogJ commented Oct 13, 2022

Unfortunately Scrutiny doesn't support the PUID and PGID env variables (I'm guessing you set them up for the LSIO image?)

I'd be happy to add support for those variables, would you be willing to open a PR? I think you can start with setting permissions in a https://github.com/AnalogJ/scrutiny/tree/master/rootfs/etc/cont-init.d file.

@AnalogJ AnalogJ added help wanted Extra attention is needed good first issue Good for newcomers enhancement New feature or request and removed bug Something isn't working labels Oct 13, 2022
@garret
Copy link
Author

garret commented Oct 13, 2022

Unfortunately, I am everything except a programmer so I can't contribute with any PR.
I can see that the permission issues started when influxdb was introduced. If I connect scrutiny to another container running influxdb, maybe I can solve the issue this wasy?

@adripo
Copy link
Contributor

adripo commented Nov 3, 2022

Copying from the older version of linuxserver's images should do the job:
https://github.com/linuxserver/docker-baseimage-alpine/blob/4af8d4292fad7fc653eedcafd6a0443edfc1f288/root/etc/cont-init.d/10-adduser

@adripo adripo linked a pull request Nov 3, 2022 that will close this issue
@adripo
Copy link
Contributor

adripo commented Nov 3, 2022

@AnalogJ please have a look at my PR. I haven't tested the build yet.

@tomerh2001
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants