Can't figure out failed add validation for disk sharing directory from host

I have notes that suggest sharing a directory from the host to a container worked at one time but I can’t replicate it.

I found some related links but neither helps with my problem:

Steps to recreate:

$ incus create images:alpine/3.24 test
$ mkdir ~/test-share
$ incus config device add test test-share disk source=~/test-share path=/test-share shift=true
Error: Failed add validation for device "test-share": Missing source path "/home/mkgvt/test-share" for disk "test-share"

I am able to access the source so I don’t think it is a permissions problem:

$ ls -al ~/test-share/
total 10
1 drwxr-xr-x  2 mkgvt mkgvt   2 2026-08-22 10:25 ./
9 drwx------ 50 mkgvt mkgvt 130 2026-08-22 10:25 ../

I am wondering if it is a version mismatch problem. The Incus client is version 7.2 while IncusOS is at 7.3:

$ incus version
Client version: 7.2
Server version: 7.3

More detail about IncusOS:

$ incus admin os show 
WARNING: The IncusOS API and configuration is subject to change

environment:
  hostname: a3caa480-73cc-11e9-9cd3-5c26ea895600
  machine_id: 57b5b5bab80644f9878f202231ebd744
  os_name: IncusOS
  os_version: "202608201218"
  os_version_alternate: "202605281810"
  os_version_next: "202608201218"
  system_is_ready: true
  uptime: 147

I can share a directory from the host to a container as root:

$ doas -s
root# incus create images:alpine/3.24 test
root# mkdir /tmp/test-share
root# touch /tmp/test-share/EMPTY
cus config device add test test-share disk source=/tmp/test-share p
ath=/test-share shift=true
Device test-share added to test
root# incus start test
root# ls /tmp/test-share/
EMPTY

Is is possible to share a directory as a non-root user? If so, what am I doing wrong?

Hmm, I’m confused as to what you’re trying to do here.

The disk configuration specifies path on the server side but it looks like you’re trying to share a path within the home directory on a completely different system, the one running the incus command line client.

Thanks for setting me on the right track Stéphane. It is obvious now that you mention it. The last time it worked was on Incus running on the same host as the client. Of course IncusOS on one set of hardware would not be able to access a file on another set of hardware running the client.

I need to rethink my approach.