Skip to content

sing-box: Don'have permission to create cache file #29108

@JKSTAFF

Description

@JKSTAFF

Package Name

sing-box

Maintainer

@ffontaine

OpenWrt Version

25.12.2

OpenWrt Target/Subtarget

ramips/mt7621

Steps to Reproduce

  1. compile 25.12 with the package and have a fresh installation
  2. add cachefile settings to config.json like:
{
  ...
  "experimental": {
    "cache_file": {"enabled": true,"path": "/etc/sing-box/cache.db","store_fakeip": true},
    "clash_api": {"external_ui": "ui","external_controller": "0.0.0.0:7890","external_ui_download_url": "https://gh-proxy.com/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip","external_ui_download_detour": "direct"}
  }
  ...
}
  1. start sing-box service and get error log daemon.err: sing-box[8917]: [31mFATAL[0m[0001] start service: initialize cache-file: open /etc/sing-box/cache.db: permission denied

Actual Behaviour

In a typical sing-box configuration, the cache file /etc/sing-box/cache.db is used to store webUI settings, DNS cache or fake IP addresses. When I compile 25.12 with the package and have a fresh installation on router, this file fails to create, resulting in a service starting failure.

Confirmation Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions