<!-- Single-sourced snippet. Included by workshop-definition.rst,
sdk-definition.rst, and sdkcraft-definition.rst.
Do not add a top-level label; the including page provides the anchor. -->

# Mount interface

<!-- @artefact mount interface -->
<!-- @artefact $SDK -->

The mount interface exposes a directory between a slot owner and a plug owner.

A mount plug is described by these attributes:

| Key                          | Value   | Description                                                                                                                                                                                                                             |
|------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `workshop-target` (required) | string  | Path inside the workshop used as the plug’s target directory.<br/>Must be an absolute path;<br/>`$SDK` expands to the SDK’s installation path in the workshop.                                                                          |
| `mode`                       | integer | File permissions, in octal, applied when creating `workshop-target`<br/>and any missing parent directories.<br/>Defaults to `0o775` for regular users.<br/>When `uid` is zero, defaults to `0o755`.                                     |
| `uid`                        | integer | User ID applied when creating `workshop-target`<br/>and any missing parent directories.<br/>Defaults to `1000` when `workshop-target` is under<br/>`/home/workshop/`, `/project/`, or `/run/user/1000/`.<br/>Defaults to `0` otherwise. |
| `gid`                        | integer | Group ID applied when creating `workshop-target`<br/>and any missing parent directories.<br/>Defaults to `1000` or `0`<br/>by the same path rule as `uid`,<br/>even when `uid` is set explicitly.                                       |
| `read-only`                  | Boolean | Whether the target directory should be read-only.<br/>Defaults to `false`.                                                                                                                                                              |

Plug owner: any regular SDK; not the system SDK.

The system SDK provides one mount slot, `system:mount`,
with a dynamic `host-source` attribute
that can be configured only at [remount](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-remount).
It is the only mount slot whose source is on the host filesystem.

A mount slot on a regular SDK is described by this attribute:

| Key                          | Value   | Description                                                                                                                                                    |
|------------------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `workshop-source` (required) | string  | Path inside the workshop used as the slot’s source directory.<br/>Must be an absolute path;<br/>`$SDK` expands to the SDK’s installation path in the workshop. |
