{"record":{"id":"4b3b914d3a900e3e","repo":"jdx/mise","slug":"has-unsaved-directory-permission-changes-save","errorCode":null,"errorMessage":"{} has unsaved directory permission changes; save them before pulling. Sharing is paused","messagePattern":"(.+?) has unsaved directory permission changes; save them before pulling\\. Sharing is paused","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/directories.rs","lineNumber":82,"sourceCode":"        let path = roots.locate(portable).path().unwrap().to_path_buf();\n        let before = observe(&path)?;\n        let desired = tracked\n            .manifest\n            .permissions\n            .get(portable)\n            .copied()\n            .unwrap_or(0o755);\n        let was_directory = local\n            .as_deref()\n            .map(|head| repo.object_at(head, portable))\n            .transpose()?\n            .flatten()\n            .is_some_and(|(mode, _)| mode == \"040000\");\n        if was_directory\n            && before.map(|(_, _, bits)| bits)\n                != Some(saved.permissions.get(portable).copied().unwrap_or(0o755))\n        {\n            bail!(\n                \"{} has unsaved directory permission changes; save them before pulling. Sharing is paused\",\n                crate::file::display_path(&path)\n            );\n        }\n        if before.map(|(_, _, bits)| bits) != Some(desired) {\n            steps.push(Step {\n                path,\n                before,\n                desired,\n                written: None,\n            });\n        }\n    }\n    steps.sort_by_key(|step| step.path.components().count());\n    Ok(steps)\n}\n\nimpl Step {","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/directories.rs#L64-L100","documentation":"Before pulling, the directories planner compares the directory's live permission bits with the last-saved permissions recorded for it. If the directory is tracked in history as a directory (mode 040000) and the live mode differs from the saved one, there are unsaved local permission changes that a pull would silently overwrite — so mise refuses and pauses sharing for that path. Users must persist (commit/push) their permission change first.","triggerScenarios":"`plan` in directories.rs sees `was_directory` true and `before` (live dev/ino/mode bits) != Some(saved.permissions... or default 0o755): the directory's current mode differs from what was last saved in history at pull time.","commonSituations":"You chmod'ed a shared dotfiles directory locally but haven't pushed; a teammate changed permissions remotely and your local chmod conflicts; a fresh clone applied different umask so modes diverge from saved values.","solutions":["Save your permission change first (e.g. commit/push the mode via your sync workflow) so history reflects it, then pull.","Or discard the local chmod to match the saved permissions: `chmod <saved-mode> <path>`, then retry the pull.","Re-run `mise dot sync` after reconciling; the pause is per-path and clears once modes agree.","Check with `stat -c '%a' <path>` versus the saved permissions to see exactly what diverged."],"exampleFix":"// before\n$ chmod 700 ~/.config/private   # unsaved\n$ mise dot sync\nerror: ~/.config/private has unsaved directory permission changes; save them before pulling...\n// after\n$ chmod 755 ~/.config/private   # or save/push your change first\n$ mise dot sync","handlingStrategy":"validation","validationCode":"# compare live mode against last-saved permissions before pulling\nstat -c '%a' ~/.config/private   # must match the saved mode in history, else save or revert first","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always commit/push chmod changes to shared directories before pulling.","Avoid ad-hoc chmods on synced directories.","Watch umask differences when restoring from clones — normalize modes before syncing."],"tags":["permissions","sync","directories","conflict"],"backgroundTag":"conflicting-config-options","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}