← Back to issue list

fix(pebble): /var/lib/pebble/default has mode 0777

View original Github issue

Metadata

Project
rockcraft
Number
#473
Type
pull request
State
merged
Author
rebornplusplus
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged fix ensuring /var/lib/pebble/default uses mode 0777, preventing non-root failures when no services or checks are defined. Added a dedicated spread test to verify the permission setting.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1317 fix: set sticky bit on the default directory rockcraft merged Merged fix for #1170 updating /var/lib/pebble/default permissions from 0777 to 01777. The added sticky bit prevents unauthorized file removal while preserving non-root write access. Affected base images require rebuilding.
80%
#552 fix: change pebble dir in 24.04 from /.rock/bin to /usr/bin rockcraft merged Merged a fix updating the pebble binary path from /.rock/bin to /usr/bin for Ubuntu 24.04+ rocks. Approved by two reviewers, passed CI, and builds on PR #528 to ensure stable runtime paths.
75%
#645 fix(spread): Pebble no longer supports -v with exec rockcraft merged Merged a one-line fix to update a failing spread test after Pebble removed -v support for the exec command. Approved by two reviewers and passed CI checks.
72%