AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Permission denied when creating DNS data dir in /opt/

Open JosSamLoh opened this issue 3 months ago • 3 comments

Prerequisites

Platform (OS and CPU architecture)

Custom (please mention in the description)

Installation

Docker

Setup

On one machine

AdGuard Home version

"latest" / v0.107.65

Action

Installed adguardhome docker onto Fedora Server on my Pi 400, following all the instructions on the docker page.

Expected result

For everything to be set-up correctly and for the web interfaces to just work. Installing adguardhome normally without docker has worked fine in the past personally.

Actual result

Nothing, no errors, no setup screen, no login screen, and work/conf dirs stay empty. Had to check docker logs to find out the issue:

adguardhome  | 2025/09/14 17:02:59.634024 [info] AdGuard Home, version v0.107.65
adguardhome  | 2025/09/14 17:02:59.635481 [info] This is the first time AdGuard Home is launched
adguardhome  | 2025/09/14 17:02:59.635862 [info] Checking if AdGuard Home has necessary permissions
adguardhome  | 2025/09/14 17:02:59.639316 [info] AdGuard Home can bind to port 53
adguardhome  | 2025/09/14 17:02:59.649209 [info] tls_manager: using default ciphers
adguardhome  | 2025/09/14 17:02:59.650294 [fatal] creating DNS data dir at /opt/adguardhome/work/data: mkdir /opt/adguardhome/work/data: permission denied

And even after manually setting the directory to be owned by docker it still fails.

Additional information and/or screenshots

Hardware: Pi 400 OS: Fedora Server 42 Kernel: 6.16.7-200.fc42.aarch64

JosSamLoh avatar Sep 14 '25 17:09 JosSamLoh

When I recently had this issue (on OpenSUSE), it was a SELinux problem. I fixed it by adding this snippet to my docker-compose.yml under each service:

security_opt:
      - label:disable

pcarlip avatar Nov 28 '25 04:11 pcarlip

security_opt: - label:disable

kfcxzaq084 avatar Nov 28 '25 04:11 kfcxzaq084

https://api.adguard-dns.io/oapi/v1/devices

kfcxzaq084 avatar Nov 28 '25 04:11 kfcxzaq084