AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home/overview.html
GNU General Public License v3.0
25.58k stars 1.84k forks source link

Permission denied when first run AdGuard Home without superuser #7170

Open PIKACHUIM opened 3 months ago

PIKACHUIM commented 3 months ago

Prerequisites

Platform (OS and CPU architecture)

FreeBSD, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.107.52

Action

Config file:

......
dns:
  port: 5353
......

Expected result

Succeed to run

Actual result

2024/08/06 05:28:10 [info] AdGuard Home, version v0.107.52
2024/08/06 05:28:10 [info] service: control action: run
2024/08/06 05:28:10.712366 [info] AdGuard Home, version v0.107.52
2024/08/06 05:28:10.712387 [info] AdGuard Home is running as a service
2024/08/06 05:28:10.713052 [info] tls: using default ciphers
2024/08/06 05:28:10.713364 [fatal] initializing hosts container: hosts container: adding path: os watcher: permission denied

Additional information and/or screenshots

Hello! I do not have root privileges and need to initialize or directly start adguardhome as a non superuser But I encountered a problem on freebsd, which prompted me with hosts container: adding path: os viewer: permission denied I hope to receive a solution, thank you very much!

PIKACHUIM commented 3 months ago

Full log:

2024/08/06 05:34:40 [info] AdGuard Home, version v0.107.52
2024/08/06 05:34:40 [info] service: control action: run
2024/08/06 05:34:40.685556 77711#35 [info] AdGuard Home, version v0.107.52
2024/08/06 05:34:40.685577 77711#35 [debug] current working directory is /usr/home/*****************/
2024/08/06 05:34:40.685590 77711#35 [info] AdGuard Home is running as a service
2024/08/06 05:34:40.685627 77711#35 [debug] reading config file "/*****************/AdGuardHome.yaml"
2024/08/06 05:34:40.685879 77711#35 [debug] got schema version 28
2024/08/06 05:34:40.686086 77711#35 [info] tls: using default ciphers
2024/08/06 05:34:40.686154 77711#35 [debug] hosts container: starting
2024/08/06 05:34:40.686178 77711#35 [debug] hosts container: refreshing
2024/08/06 05:34:40.686309 77711#35 [debug] hostsfile: source "/etc/hosts": line 5: name at index 2: bad domain name "***********.": bad top-level domain name label "": top-level domain name label is empty
2024/08/06 05:34:40.686364 77711#35 [debug] hostsfile: source "/etc/hosts": line 6: name at index 2: bad domain name "***********.": bad top-level domain name label "": top-level domain name label is empty
2024/08/06 05:34:40.686411 77711#35 [debug] hostsfile: source "/etc/hosts": line 7: name at index 4: bad domain name "***********.": bad top-level domain name label "": top-level domain name label is empty
2024/08/06 05:34:40.686454 77711#35 [debug] hosts container: sending upd
2024/08/06 05:34:40.686502 77711#35 [fatal] initializing hosts container: hosts container: adding path: os watcher: permission denied