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

touch: cannot touch '/config/database.sqlite': Permission denied #473

Closed
yonas opened this issue Mar 11, 2023 · 3 comments
Closed

touch: cannot touch '/config/database.sqlite': Permission denied #473

yonas opened this issue Mar 11, 2023 · 3 comments

Comments

@yonas
Copy link

yonas commented Mar 11, 2023

docker-compose.yaml

version: '3.3'

services:
    speedtest-tracker:
        container_name: speedtest-tracker
        ports:
            - '8080:80'
            - '8443:443'
        environment:
            - PUID=1000
            - PGID=1000
        volumes:
            - './config:/config'
        image: 'ghcr.io/alexjustesen/speedtest-tracker:latest'
        restart: unless-stopped

Console

$ doas docker-compose up
speedtest-tracker    | usermod: no changes
speedtest-tracker    | 
speedtest-tracker    | --------------------------------------------------------------------
speedtest-tracker    | 
speedtest-tracker    |  _______                       __ __                __
speedtest-tracker    | |     __|.-----.-----.-----.--|  |  |_.-----.-----.|  |_
speedtest-tracker    | |__     ||  _  |  -__|  -__|  _  |   _|  -__|__ --||   _|
speedtest-tracker    | |_______||   __|_____|_____|_____|____|_____|_____||____|
speedtest-tracker    |          |__|
speedtest-tracker    |  _______                   __
speedtest-tracker    | |_     _|.----.---.-.----.|  |--.-----.----.
speedtest-tracker    |   |   |  |   _|  _  |  __||    <|  -__|   _|
speedtest-tracker    |   |___|  |__| |___._|____||__|__|_____|__|
speedtest-tracker    | 
speedtest-tracker    | 
speedtest-tracker    | --------------------------------------------------------------------
speedtest-tracker    | 
speedtest-tracker    | To support Speedtest Tracker visit:
speedtest-tracker    | https://github.com/alexjustesen/speedtest-tracker
speedtest-tracker    | -------------------------------------
speedtest-tracker    | GID/UID
speedtest-tracker    | -------------------------------------
speedtest-tracker    | 
speedtest-tracker    | User uid:    1000
speedtest-tracker    | User gid:    1000
speedtest-tracker    | -------------------------------------
speedtest-tracker    | 
speedtest-tracker    | 🔒 SSL_MODE has been set to MIXED, setting the web server to work in HTTP + HTTPS...
speedtest-tracker    | 
speedtest-tracker    | 🐇  Configuring Speedtest Tracker...
speedtest-tracker    | 
speedtest-tracker    | 🙄  SQLite database not found, creating...
speedtest-tracker    | touch: cannot touch '/config/database.sqlite': Permission denied
speedtest-tracker    | s6-rc: warning: unable to start service laravel-automations: command exited 1
speedtest-tracker    | /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.
speedtest-tracker    | prog: fatal: stopping the container.

OS: Ubuntu 22.10 amd64

@alexjustesen
Copy link
Owner

Make sure to double check your puid and pgid

@yonas
Copy link
Author

yonas commented Mar 12, 2023

Thanks, that worked. doas chown -R yonas:yonas config

@yonas yonas closed this as completed Mar 12, 2023
@MarvvanPal
Copy link

Just stumbled across this too because I use rootless docker.

The post helped me.

For me the PUID and PUID 1000 is mapped to 100999.

So, before starting the container on the host run chown -R 100999:100999 {projectfoldername}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants