personal-files provides access to the specified files in the user’s home. This interface gives privileged access to the user’s data.

Auto-connect: no
Attributes:

  • read (plug): list of files and/or directories for read-only access (eg, ‘read: [ $HOME/.file-read, $HOME/.dir-read ]
  • write (plug): list of files and/or directories for read/write access (eg, ‘write: [ $HOME/.file-write, $HOME/.dir-write ]

Transitional: no

Requires snapd version 2.37+. This interface is typically used for providing read-only access to top-level hidden data directories to snaps that are the clear owner of the directory in order to support importing from existing applications. Consumers of this interface require a snap declaration for distribution via the Snap Store.

An additional requirement for acceptance in the Global store is using a descriptive interface reference for use with snap connections|interfaces|connect|disconnect. For example, the ‘foo’ application is packaged as a snap and the snap publisher wants to import existing configuration from ~/.config/foo into the snap. The snapcraft.yaml might be:

name: foo
...
plugs:
  config-foo:
    interface: personal-files
    read:
    - $HOME/.config/foo

apps:
  foo:
    plugs:
    - config-foo
    ...

With the above, a snap connect command would look like: snap connect foo:config-foo.

ⓘ This is a snap interface. See Interface management and Supported interfaces for further details on how interfaces are used.