← Back to issue list

Permission changes in files are not detected

View original Github issue

Metadata

Project
craft-parts
Number
#311
Type
issue
State
open
Author
facundobatista
Labels
Created
Updated
Closed

Current evaluation

Local source handler's check_if_outdated only compares st_mtime, so chmod changes are not detected as file updates during the pull step. Reported by maintainer with clear repro; no labels, no maintainer response beyond a JIRA bot ticket (CRAFT-2963).

Suggested action: needs triage

Reason: The issue is a genuine bug with a clear reproduction (chmod not triggering re-pull), but it has no labels, no maintainer acknowledgement, and the only comment is an automated JIRA sync bot from 2024-05-17. The code in local_source.py:check_if_outdated confirms only st_mtime is compared (line 141, 147), with no st_mode/permission check. The fix is straightforward (add permission comparison) but requires triage to confirm scope and priority.

Impact: 40 Quick Win: 26.0 Staleness: 75 Complexity: 35 Confidence: 80 Support Request: 5

Issue body

When permissions are changed on a file, that file is not detected as "updated", and not re processed by the pull part. Example using charmcraft: ``` $ charmcraft clean Cleaning project 'my-super-charm'. Cleaned project 'my-super-charm'. $ charmcraft pack Packing the charm Created 'my-super-charm_ubuntu-22.04-amd64.charm'. Charms packed: my-super-charm_ubuntu-22.04-amd64.charm $ zipinfo -l my-super-charm_ubuntu-22.04-amd64.charm to_be_included.bin -rw-rw-r-- 2.0 unx 163 b- 105 defN 21-Aug-03 12:20 to_be_included.bin $ chmod -w to_be_included.bin $ ll to_be_included.bin -r--r--r-- 1 facundo facundo 163 ago 3 2021 to_be_included.bin $ charmcraft pack Packing the charm Created 'my-super-charm_ubuntu-22.04-amd64.charm'. Charms packed: my-super-charm_ubuntu-22.04-amd64.charm $ zipinfo -l my-super-charm_ubuntu-22.04-amd64.charm to_be_included.bin -rw-rw-r-- 2.0 unx 163 b- 105 defN 21-Aug-03 12:20 to_be_included.bin ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 26.0
Staleness: 75
Complexity: 35
Confidence: 80
Support Request: 5
needs triage Local source handler's check_if_outdated only compares st_mtime, so chmod changes are not detected as file updates during the pull step. Reported by maintainer with clear repro; no labels, no maintainer response beyond a JIRA bot ticket (CRAFT-2963).
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 75
Support Request: 5
needs triage File permission changes are not detected as updates, causing unchanged rebuilds. Reported by a maintainer ~3.7 years ago with clear reproduction steps. Currently unlabelled and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 45
Confidence: 85
Support Request: 10
close stale File permission changes are not detected during the build process, causing outdated permissions in the final archive. Open for over 3 years with only an automated Jira sync comment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 40
Confidence: 75
Support Request: 5
close stale File permission changes are not detected, causing the build process to skip re-processing modified files. Open and inactive for over a year, synced to Jira CRAFT-2963, awaiting triage and resolution.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#817 Local file changes are not detected craft-parts open Enhancement to detect local file changes (incl. permissions) for the dump plugin and mark the pull step dirty. Triaged, tracked as CRAFT-3268; maintainer confirmed no progress as of 2026-02-18.
72%