Incus-user and permission to share folders


I’d like to share a common “distfile” directory to a container. The particular folder is owned by my user, and has 0777 permissions to test, but still incus can’t add it with:

    path: /var/cache/distfiles/
    source: /var/cache/distfiles/
    type: disk

I get:

Config parsing error: Failed checking if instance update allowed: Invalid device “distfiles” on container “my-gentoo-gh-test-container” of project “user-1000”: Disk source path “/var/cache/distfiles/” not allowed

I’m pretty sure this is somehow an incus-user issue. As the user I can write to /var/cache/distfiles/ on host just fine. Could Incus need more permission folders from parent directories?

I can add directories under my ~ just fine.

As the user, I’m also getting:

Error: Certificate is restricted

When trying to create or view incus storage info. Might be related.

It looks like you get here, with allow:

but then, CheckRestrictedDevicesDiskPaths() says no.

What’s the output of the following (assuming the default project is default).

incus project get default restricted.devices.disk.paths
1 Like

Niice find, indeed I had only my home directory in that restricted.devices.disk.paths listing. It’s a comma-separated list, so now with /home/me,/var/cache/distfiles,more,andmore I get access elsewhere :slight_smile:

My user is in user-1000 project.