Tauri permissions generator

Tauri dialog permission: dialog:default

The dialog plugin (tauri-plugin-dialog) opens the operating system's native open and save file pickers and its message, ask and confirm boxes. It is the safest way for a Tauri app to reach a file: the user chooses the path in a picker they recognise, and the app receives only what was chosen.

dialog:default enables all of the pickers and message boxes. It grants no file access on its own — a path returned by the open dialog still needs the fs plugin to read, unless the dialog plugin's own read helpers are used — so pairing dialog with a narrowly scoped fs grant is the usual shape.

Dialogs at a glance

Permission
dialog:default
Cargo crate
tauri-plugin-dialog
npm bindings
@tauri-apps/plugin-dialog
Builder call
.plugin(tauri_plugin_dialog::init())
What it enables
Native open/save file pickers and message boxes.
What it widens
Only opens native pickers and message boxes. The user chooses the path, so this is the safest way to touch files.

The four files that must agree

Capability file

src-tauri/capabilities/default.json
{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capabilities granted to the main window.",
  "windows": [
    "main"
  ],
  "permissions": [
    "core:default",
    "dialog:default"
  ]
}

core:default is the baseline every window has; the plugin permission is the one line this page adds.

Cargo dependency

src-tauri/Cargo.toml
[dependencies]
tauri = { version = "2", features = [] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tauri-plugin-dialog = "2"

Plugin registration

src-tauri/src/lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_dialog::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

A crate that is declared but never registered is dead weight; one registered without its permission is a runtime denial.

Frontend bindings

terminal
npm install @tauri-apps/plugin-dialog

dialog:default, answered

The longer version is in the guide Tauri 2 permissions: capabilities without the runtime denials.

What does dialog:default grant in Tauri 2?
dialog:default is the default permission set of tauri-plugin-dialog. It native open/save file pickers and message boxes. Tauri 2 denies every command that is not listed in a capability file, so without this line the plugin's commands fail at runtime even though the crate compiles and is registered.
Why does my dialogs call fail with a permission error?
Three files have to agree: tauri-plugin-dialog in Cargo.toml, .plugin(tauri_plugin_dialog::init()) in src/lib.rs, and dialog:default in the capability file under src-tauri/capabilities/. The ACL is checked when a command is invoked, not when the app is built, so a missing permission string compiles cleanly and denies at runtime. The frontend also needs @tauri-apps/plugin-dialog installed to call it.
Is dialog:default safe to ship?
Only opens native pickers and message boxes. The user chooses the path, so this is the safest way to touch files. Permissions are additive on top of core:default, so the least-privilege shape is to grant only the plugins the app calls, and to prefer the plugin's granular allow-* permissions over the default set wherever a command or path can be named.

Combine it with the rest of your capability file

The Tauri permissions generator builds the whole file from the same catalogue — tick every plugin the app calls, add a custom title bar's window permissions, and copy the capability JSON, Cargo dependencies, builder chain and npm install line together. In the Nodlume workspace the same selection is what the Desktop export writes into src-tauri.

Open the generator

Other Tauri 2 plugin permissions

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.