openwrt / openwrt/packages

i2pd: bad `chown` call not setting pidfile ownership, causing service to fail

Open Beginner friendly
#22,971 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Maintainer: @r4sas
Environment: Qualcomm Atheros QCA9558 ver 1 rev 0, TP-Link Archer C7 v1, OpenWrt 23.05.2 r23630-842932a63d

https://github.com/openwrt/packages/blob/ad5a83c4a4f90b8b170db2780c9ddb9239759037/net/i2pd/files/i2pd.init#L60

The group adm may not exist, shouldn't it be $USER:$GROUP here?
On my device, the pidfile has ownership root:root, which might be because of a failed chown call.

Thus, on service start, I get:

daemon.err i2pd[1234]: i2pd: Could not create pid file /var/run/i2pd.pid: Permission denied

This issue does not persist when I change ownership to :$GROUP in the init.d script.

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 with net/i2pd/files/i2pd.init around line 60 and inspect how USER and GROUP are defined and used in the chown call. Run the i2pd service on an OpenWrt environment or review its init-script behavior, then verify that the pidfile is created with the expected ownership and the service starts successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.