Mount interface

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. Must be an absolute path; $SDK expands to the SDK’s installation path in the workshop.

mode

integer

File permissions, in octal, applied when creating workshop-target and any missing parent directories. Defaults to 0o775 for regular users. When uid is zero, defaults to 0o755.

uid

integer

User ID applied when creating workshop-target and any missing parent directories. Defaults to 1000 when workshop-target is under /home/workshop/, /project/, or /run/user/1000/. Defaults to 0 otherwise.

gid

integer

Group ID applied when creating workshop-target and any missing parent directories. Defaults to 1000 or 0 by the same path rule as uid, even when uid is set explicitly.

read-only

Boolean

Whether the target directory should be read-only. 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. 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. Must be an absolute path; $SDK expands to the SDK’s installation path in the workshop.