{"record":{"id":"890fb0e3fcc50677","repo":"tauri-apps/tauri","slug":"failed-to-chmod-script","errorCode":null,"errorMessage":"Failed to chmod script","messagePattern":"Failed to chmod script","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-bundler/src/bundle/macos/dmg/mod.rs","lineNumber":99,"sourceCode":"  write(&bundle_script_path, include_str!(\"./bundle_dmg\"))?;\n  write(\n    support_directory_path.join(\"template.applescript\"),\n    include_str!(\"./template.applescript\"),\n  )?;\n  write(\n    support_directory_path.join(\"eula-resources-template.xml\"),\n    include_str!(\"./eula-resources-template.xml\"),\n  )?;\n\n  // chmod script for execution\n  Command::new(\"chmod\")\n    .arg(\"777\")\n    .arg(&bundle_script_path)\n    .current_dir(&output_path)\n    .stdout(Stdio::piped())\n    .stderr(Stdio::piped())\n    .output()\n    .expect(\"Failed to chmod script\");\n\n  let dmg_settings = settings.dmg();\n\n  let app_position = &dmg_settings.app_position;\n  let application_folder_position = &dmg_settings.application_folder_position;\n  let window_size = &dmg_settings.window_size;\n\n  let app_position_x = app_position.x.to_string();\n  let app_position_y = app_position.y.to_string();\n  let application_folder_position_x = application_folder_position.x.to_string();\n  let application_folder_position_y = application_folder_position.y.to_string();\n  let window_size_width = window_size.width.to_string();\n  let window_size_height = window_size.height.to_string();\n\n  let mut bundle_dmg_cmd = Command::new(&bundle_script_path);\n\n  bundle_dmg_cmd.args([\n    \"--volname\",","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-bundler/src/bundle/macos/dmg/mod.rs#L81-L117","documentation":"Panics in bundle_project when running `chmod 777` on the generated bundle_dmg script fails during macOS DMG bundling. The bundle script must be executable for the DMG creation step to proceed; this is an .expect() on the Command output, so the whole bundling process aborts with this panic message.","triggerScenarios":"Thrown at crates/tauri-bundler/src/bundle/macos/dmg/mod.rs:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the bundler process has write/execute permission on the output support directory.","Verify the output_path exists and is on a filesystem that supports permission changes (not FAT/exFAT).","Run the bundler with sufficient privileges, or pre-create the bundle script with executable permissions."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}