fix(pebble): /var/lib/pebble/default has mode 0777
Metadata
Current evaluation
Merged PR #473 via commit 72c1af5d, fixing #461 by always setting /var/lib/pebble/default to mode 0777, including rocks without services or checks.
Resolution: closed resolved
Reason: PR #473 was merged with approval from three reviewers. Commit 72c1af5d ensures non-root Pebble processes can create required socket files even when no services or checks are configured.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Fixes #461.
This PR ensures that the `PEBBLE` default directory `/var/lib/pebble/default` always has the mode 0777.
Previously, the mode of the `PEBBLE` dir was only set to 0777 if there were services or checks specified in the `rockcraft.yaml` file. Otherwise, it used to be 0755 with user=`root` group=`root`. This meant that if Pebble was being run as some user other than root, using the `run-user` directive or some other way, the Pebble run would fail. It would fail because Pebble could not create the necessary files (socket) inside that directory. This bug is reported in issue https://github.com/canonical/rockcraft/issues/461.
-----
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #473 via commit 72c1af5d, fixing #461 by always setting /var/lib/pebble/default to mode 0777, including rocks without services or checks. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #473 (72c1af5d), ensuring /var/lib/pebble/default has mode 0777 even without services or checks, fixing Pebble socket creation for non-root users. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix ensuring /var/lib/pebble/default always uses 0777 permissions, preventing non-root Pebble failures. Approved by three reviewers, passed CI, and includes a new spread test to verify the fix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Ensures /var/lib/pebble/default always uses mode 0777, preventing non-root execution failures when no services or checks are defined. Resolves #461 with a dedicated spread test verifying the permissions. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/rockcraft#461
(confidence 100%)
The reported run-user failure without services; PR #473 explicitly fixes this issue.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1317 fix: set sticky bit on the default directory | rockcraft | merged | Merged #1317 in commit 88c7ae17, changing /var/lib/pebble/default from 0777 to 01777 in both creation paths and adding permission coverage; fixes #1170. | |
| #552 fix: change pebble dir in 24.04 from /.rock/bin to /usr/bin | rockcraft | merged | Merged PR #552 (commit 15b653a2), moving Pebble from /.rock/bin to /usr/bin for Ubuntu 24.04 and later to provide a stable runtime path. | |
| #528 fix(pebble): place pebble in a separate location | rockcraft | merged | PR #528 merged via commit 3dddfa14, moving the Pebble binary from bin/ to .rock/bin so it no longer collides with Ubuntu 24.04 base-files' bin symlink to usr/bin. | |
| #1170 missing sticky bit in PEBBLE_PATH | rockcraft | closed | Rockcraft now sets Pebble's default directory to mode 01777, adding the missing sticky bit; the fix was merged in canonical/rockcraft#1317 (88c7ae17). |