ERROR cannot write to file "/updater/data/updates.json #64

Closed
opened 2025-11-20 04:19:41 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @BK-STAR77 on GitHub (Oct 2, 2020).

Hello,

After deploy with docker-compose I have this error:

Running version latest built on 2020-09-29T22:44:01Z (commit 5b52255)

📣  Support for he.net

🔧  Need help? https://github.com/qdm12/ddns-updater/issues/new
💻  Email? quentin.mcgaw@gmail.com
☕  Slack? Join from the Slack button on Github
💸  Help me? https://github.com/sponsors/qdm12
2020-10-02T15:59:04.966Z	ERROR	cannot write to file "/updater/data/updates.json": open /updater/data/updates.json: permission denied

My docker compose:

  Ddns-updater:
    image: qmcgaw/ddns-updater:latest
    container_name: ddns-updater
    network_mode: bridge
    dns:
      - 1.1.1.1
    ports:
      - 8000:8000/tcp
    volumes:
      - /home/media/ddns-updater/config:/updater/data
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - CONFIG={"settings":[{"provider":"noip","domain":"xxxx.ddnsking.com","host":"@","username":"xxxxxx@gmail.com","password":"xxxxxx":"ipv4"}]}
      - PERIOD=12h
      - IP_METHOD=cycle
      - IPV4_METHOD=cycle
      - IPV6_METHOD=cycle
      - HTTP_TIMEOUT=10s

      # Web UI
      - LISTENING_PORT=8000
      - ROOT_URL=/

      # Backup
      - BACKUP_PERIOD=72h15m # 0 to disable
      - BACKUP_DIRECTORY=/updater/data

      # Other
      - LOG_ENCODING=console
      - LOG_LEVEL=info
      - NODE_ID=-1 # -1 to disable
      # - GOTIFY_URL=
      # - GOTIFY_TOKEN=

thanks in advance

Originally created by @BK-STAR77 on GitHub (Oct 2, 2020). Hello, After deploy with docker-compose I have this error: ``` Running version latest built on 2020-09-29T22:44:01Z (commit 5b52255) 📣 Support for he.net 🔧 Need help? https://github.com/qdm12/ddns-updater/issues/new 💻 Email? quentin.mcgaw@gmail.com ☕ Slack? Join from the Slack button on Github 💸 Help me? https://github.com/sponsors/qdm12 2020-10-02T15:59:04.966Z ERROR cannot write to file "/updater/data/updates.json": open /updater/data/updates.json: permission denied ``` My docker compose: ```yml Ddns-updater: image: qmcgaw/ddns-updater:latest container_name: ddns-updater network_mode: bridge dns: - 1.1.1.1 ports: - 8000:8000/tcp volumes: - /home/media/ddns-updater/config:/updater/data environment: - PUID=${PUID} - PGID=${PGID} - CONFIG={"settings":[{"provider":"noip","domain":"xxxx.ddnsking.com","host":"@","username":"xxxxxx@gmail.com","password":"xxxxxx":"ipv4"}]} - PERIOD=12h - IP_METHOD=cycle - IPV4_METHOD=cycle - IPV6_METHOD=cycle - HTTP_TIMEOUT=10s # Web UI - LISTENING_PORT=8000 - ROOT_URL=/ # Backup - BACKUP_PERIOD=72h15m # 0 to disable - BACKUP_DIRECTORY=/updater/data # Other - LOG_ENCODING=console - LOG_LEVEL=info - NODE_ID=-1 # -1 to disable # - GOTIFY_URL= # - GOTIFY_TOKEN= ``` thanks in advance
Author
Owner

@qdm12 commented on GitHub (Oct 2, 2020):

I assume you missed the chmod part in the readme? If so, it's still interesting! I'll update the readme to be clearer about the next steps to follow.

@qdm12 Clarify next step transition in readme

@qdm12 commented on GitHub (Oct 2, 2020): I assume you missed the chmod part in the readme? If so, it's still interesting! I'll update the readme to be clearer about the next steps to follow. @qdm12 Clarify next step transition in readme
Author
Owner

@BK-STAR77 commented on GitHub (Oct 4, 2020):

ok but I'm not using the config file setting but the CONFIG variable and you said on the Readme:

" Note that this CONFIG environment variable takes precedence over the config.json file if it is set."

@BK-STAR77 commented on GitHub (Oct 4, 2020): ok but I'm not using the config file setting but the CONFIG variable and you said on the Readme: " Note that this CONFIG environment variable takes precedence over the config.json file if it is set."
Author
Owner

@qdm12 commented on GitHub (Oct 4, 2020):

Oops let me recheck that.

@qdm12 commented on GitHub (Oct 4, 2020): Oops let me recheck that.
Author
Owner

@qdm12 commented on GitHub (Oct 4, 2020):

Ok so now:

  1. The Docker image contains a data directory by default so it will now work the way you run it now. But you won't have the persistent database file updates.json
  2. I clarified the readme to create the data directory in all cases such that you can have this updates.json database file. CONFIG will still take precedence over config.json which you don't actually need to set up.

Happy DDNSing!

@qdm12 commented on GitHub (Oct 4, 2020): Ok so now: 1. The Docker image contains a data directory by default so it will now work the way you run it now. But you won't have the persistent database file `updates.json` 2. I clarified the readme to create the data directory in all cases such that you can have this updates.json database file. CONFIG will still take precedence over config.json which you don't actually need to set up. Happy DDNSing!
Author
Owner

@qdm12 commented on GitHub (Oct 4, 2020):

Also note that

      - PUID=${PUID}
      - PGID=${PGID}

Don't do anything. These are often specific to linuxserver's Docker images. In my Docker image, there is only one process which runs with user 1000 from the start (unlike linuxserver where it starts with root and then drops it). You can however specify for example user: "1001" to run the container with another user ID 😉

@qdm12 commented on GitHub (Oct 4, 2020): Also note that ```yml - PUID=${PUID} - PGID=${PGID} ``` Don't do anything. These are often specific to linuxserver's Docker images. In my Docker image, there is only one process which runs with user `1000` from the start (unlike linuxserver where it starts with root and then drops it). You can however specify for example `user: "1001"` to run the container with another user ID 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#64