tauri-apps/tauri · error
Failed to chmod script
Error message
Failed to chmod script
What it means
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.
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.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/tauri-bundler/src/bundle/macos/dmg/mod.rs:99 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/890fb0e3fcc50677.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-bundler/src/bundle/macos/dmg/mod.rs:99
write(&bundle_script_path, include_str!("./bundle_dmg"))?;
write(
support_directory_path.join("template.applescript"),
include_str!("./template.applescript"),
)?;
write(
support_directory_path.join("eula-resources-template.xml"),
include_str!("./eula-resources-template.xml"),
)?;
// chmod script for execution
Command::new("chmod")
.arg("777")
.arg(&bundle_script_path)
.current_dir(&output_path)
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
.expect("Failed to chmod script");
let dmg_settings = settings.dmg();
let app_position = &dmg_settings.app_position;
let application_folder_position = &dmg_settings.application_folder_position;
let window_size = &dmg_settings.window_size;
let app_position_x = app_position.x.to_string();
let app_position_y = app_position.y.to_string();
let application_folder_position_x = application_folder_position.x.to_string();
let application_folder_position_y = application_folder_position.y.to_string();
let window_size_width = window_size.width.to_string();
let window_size_height = window_size.height.to_string();
let mut bundle_dmg_cmd = Command::new(&bundle_script_path);
bundle_dmg_cmd.args([
"--volname",View on GitHub (pinned to 460ec35447)