openwrt / openwrt/packages

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

Open
#29,108 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug release/25.12
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Package Name

sing-box

Maintainer

@brvphoenix

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the sing-box package definition and its service configuration, then reproduce the fresh-install setup with the shown cache_file path. Trace which account starts the service and whether it can create /etc/sing-box/cache.db; done means the package permits the configured cache file and sing-box starts successfully on the listed OpenWrt target.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.