Applications which are installed by snapd are not found(e.g. when I tried to run notepadqq it said that this application is not installed unlike root user it worked and got running) by non-root users
strcuture of /snap (ls -lahHQ /snap
):
total 140Kdrwx---r-x 34 root root 4.0K Sep 5 19:17 "."drwxr-xr-x 24 root root 4.0K Aug 31 14:15 ".."drwxr-xr-x 3 root root 4.0K May 16 2022 "bare"drwx------ 2 root root 4.0K Sep 5 19:17 "bin"drwxr-xr-- 4 root root 4.0K Aug 31 23:29 "bitcoin-core"drwxr-xr-- 4 root root 4.0K Aug 31 23:30 "canonical-livepatch"drwxr-xr-x 3 root root 4.0K Sep 5 19:17 "colorpie"drwxr-xr-x 4 root root 4.0K Aug 31 23:23 "core"drwxr-xr-x 4 root root 4.0K Aug 31 23:21 "core18"drwxr-xr-x 4 root root 4.0K Aug 31 23:22 "core20"drwxr-xr-x 4 root root 4.0K Aug 31 23:23 "core22"drwxr-xr-x 3 root root 4.0K Aug 31 23:27 "core24"drwxr-xr-x 3 root root 4.0K Sep 1 16:29 "firmware-updater"drwxr-xr-- 4 root root 4.0K Aug 31 23:34 "gifski"drwxr-xr-- 4 root root 4.0K Aug 31 23:31 "gitea"drwxr-xr-- 3 root root 4.0K Jan 2 2024 "gnome-3-28-1804"drwxr-xr-- 3 root root 4.0K Jan 2 2024 "gnome-3-38-2004"drwxr-xr-x 3 root root 4.0K Sep 1 01:11 "gnome-42-2204"drwxr-xr-- 3 root root 4.0K Jan 2 2024 "gtk-common-themes"drwxr-xr-x 3 root root 4.0K Sep 5 19:14 "hetty"drwxr-xr-x 3 root root 4.0K Sep 5 19:17 "ipfs"drwxr-xr-- 4 root root 4.0K Aug 31 23:35 "ipfs-desktop"drwxr-xr-- 3 root root 4.0K Jan 2 2024 "kde-frameworks-5-99-qt-5-15-7-core20"drwxr-xr-- 4 root root 4.0K Aug 31 23:43 "metasploit-framework"drwxr-xr-x 4 root root 4.0K Sep 4 13:48 "multipass"drwxr-xr-x 3 root root 4.0K Sep 5 19:12 "notepadqq"drwxr-xr-x 3 root root 4.0K Sep 5 19:14 "password-creator"drwxr-xr-x 3 root root 4.0K May 16 2022 "qt513"-r--r--r-- 1 root root 548 May 16 2022 "README"drwxr-xr-x 3 root root 4.0K Sep 1 16:35 "snapd-desktop-integration"drwxr-xr-x 3 root root 4.0K Sep 1 16:33 "snap-store"drwxr-xr-x 3 root root 4.0K Sep 5 19:08 "sqlmap"drwxr-xr-x 3 root root 4.0K Sep 5 19:08 "sqlmap-cli"drwxr-xr-- 4 root root 4.0K Aug 31 23:30 "terraform"drwxr-xr-x 3 root root 4.0K Sep 5 19:12 "urh"
ACL of snap(getfacl /snap
)
getfacl: Removing leading '/' from absolute path names# file: snap# owner: root# group: rootuser::rwxgroup::---other::r-x
structure of /var/lib/snapd (ls -lahHQ /var/lib/snapd
)
drwxrwxr--+ 24 root root 4.0K Sep 5 19:22 "."drwxr-xr-x+ 151 root root 4.0K Sep 1 18:32 ".."drwxrwxr-x 4 root root 4.0K May 16 2022 "apparmor"drwxrwxr-x 4 root root 4.0K May 16 2022 "assertions"drwxrwxr-x 2 root root 4.0K Apr 21 2022 "auto-import"drwxrwx--- 2 root root 4.0K Sep 5 19:14 "cache"drwxr-xr-x 2 root root 4.0K Sep 5 19:17 "cgroup"drwxrwx--- 2 root root 4.0K Sep 5 19:17 "cookie"drwxrwxr-x 4 root root 4.0K May 16 2022 "dbus-1"drwxrwxr-x 5 root root 4.0K Oct 16 2022 "desktop"drwxrwxr-x 3 root root 4.0K May 16 2022 "device"drwxrwxr-x 2 root root 4.0K Apr 21 2022 "environment"-rw-rwx--- 1 root root 32K Jan 16 2024 "errtracker.db"drwxrwxr-x 2 root root 4.0K Dec 4 2023 "features"drwxrwxr-x 2 root root 4.0K Apr 21 2022 "firstboot"drwxrwxr-x 2 root root 4.0K May 16 2022 "hostfs"drwxrwxr-x 2 root root 4.0K Sep 5 19:17 "inhibit"drwxrwxr-x 6 root root 4.0K May 16 2022 "lib"drwxrwxr-x 2 root root 4.0K Sep 5 19:17 "mount"drwxrwxr-x 3 root root 4.0K May 16 2022 "seccomp"drwxrwxr-x 2 root root 4.0K Sep 5 19:17 "sequence"drwxrwxr-x 3 root root 4.0K Sep 5 19:17 "snaps"drwxrwx--- 2 root root 4.0K May 11 2023 "snapshots"drwxrwxr-x 3 root root 4.0K May 16 2022 "ssl"-rw------- 1 root root 394K Sep 5 19:22 "state.json"-rw-rwx--- 1 root root 108K Nov 23 2023 "state.json.5lyNhRNFP8KS~"-rw-rwx--- 1 root root 111K May 13 2023 "state.json.70KG0xn1hKg6~"-rw-rwx--- 1 root root 105K Jun 11 2023 "state.json.8BgQdT6FJX75~"-rw-rwx--- 1 root root 143K Apr 1 2023 "state.json.8HdfDcGyhBFY~"-rw-rwx--- 1 root root 104K May 31 2023 "state.json.9q5XvtS9nGP9~"-rw-rwx--- 1 root root 145K Aug 20 2023 "state.json.9xKDtFQ1lRWj~"-rw-rwx--- 1 root root 124K Aug 23 2023 "state.json.Cj10WFk56Wbh~"-rw-rwx--- 1 root root 107K May 9 2023 "state.json.dRLRMy7TxNrc~"-rw-rwx--- 1 root root 109K Jul 16 2023 "state.json.FYkS28VMNCmy~"-rw-rwx--- 1 root root 110K Oct 25 2023 "state.json.gWY3rGhdnWhg~"-rw-rwx--- 1 root root 105K May 17 2023 "state.json.H1mdfG39p3Ts~"-rw-rwx--- 1 root root 145K Apr 1 2023 "state.json.HB1M1JJ0N59J~"-rw-rwx--- 1 root root 114K Mar 12 2023 "state.json.hLpxgcxdfWrP~"-rw-rwx--- 1 root root 119K Mar 15 2023 "state.json.KCpN4WlDXv2P~"-rw-rwx--- 1 root root 120K Dec 23 2022 "state.json.lHWndfY0DjxJ~"-rw-rwx--- 1 root root 130K Jun 14 2023 "state.json.LsbyfMGYNX82~"-rw-rwx--- 1 root root 109K Feb 24 2023 "state.json.M33MDQBvkHTp~"-rw-rwx--- 1 root root 118K Jan 10 2023 "state.json.QmSGQS2CQxgH~"-rw-rwx--- 1 root root 82K Sep 19 2022 "state.json.Rmxq8fmYqtGL~"-rw-rwx--- 1 root root 125K Nov 23 2022 "state.json.sC6gtSnj02MW~"-rw-rwx--- 1 root root 125K Nov 17 2022 "state.json.SJ1qdwKdN3pS~"-rw-rwx--- 1 root root 107K Dec 28 2022 "state.json.sPb6h3xYSc5R~"-rw-rwx--- 1 root root 127K Apr 13 2023 "state.json.tDdL4Wtp44lk~"-rw-rwx--- 1 root root 113K Mar 1 2023 "state.json.V4KyKK28MJSX~"-rw-rwx--- 1 root root 80K Jun 15 2022 "state.json.V5t3g6gchRDn~"-rw-rwx--- 1 root root 148K Jul 13 2023 "state.json.Yfl7t759GFPj~"-rw-rwxr-- 1 root root 0 May 16 2022 "state.lock"-rw-r--r-- 1 root root 790 Sep 1 01:04 "system-key"-rw-rwxr-- 1 root root 10 Jan 10 2023 "system-params"d--x--x--x 2 root root 4.0K Jan 6 2023 "void"
ACL of /var/lib/snapd(getfacl /var/lib/snapd
)
getfacl: Removing leading '/' from absolute path names# file: var/lib/snapd# owner: root# group: rootuser::rwxuser:johnm:r-xgroup::rwxmask::rwxother::r--
please note that /var/lib/snapd is a directory on another partition and bound to this directory like
/sdb1/.system-base/var/lib/snapd /var/lib/snapd ext4 rw,nosuid,nodev,nouser,async,relatime,bind 0 1/sdb1/.system-base/var/lib/snapd/mount /var/lib/snapd/mount ext4 rw,nosuid,nodev,nouser,async,relatime,bind 0 1
output of the command notepadqq on non root:
Command 'notepadqq' not found, but can be installed with:sudo snap install notepadqq # version 1.4.8, orsudo apt install notepadqq # version 2.0.0~beta1-3See 'snap info notepadqq' for additional versions.
Operating System: Ubuntu 22.04.4 LTS
Architecture: amd64
Kernel: 6.8.0-40