Snap installation prompts permission error

When I try to install notepad-plus-plus.it report error in end.
$ snap install notepad-plus-plus
2021-08-30T16:18:43+08:00 INFO Waiting for automatic snapd restart…
error: cannot perform the following tasks:

  • Run configure hook of “notepad-plus-plus” snap if present (run hook “configure”: cannot create temporary directory for the root file system: Permission denied)

$ snap --version
snap 2.51.4
snapd 2.51.4
series 16
ubuntu 18.04
kernel 5.4.0-42-generic

$ snap list
Name Version Rev Tracking Publisher Notes
core18 20210722 2128 latest/stable canonical✓ base
gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 161 latest/stable canonical✓ -
gtk-common-themes 0.1-52-gb92ac40 1515 latest/stable canonical✓ -
snapd 2.51.4 12883 latest/stable canonical✓ snapd
wine-platform-6-stable 6.0.1 5 latest/stable mmtrt -
wine-platform-runtime v1.0 239 latest/stable mmtrt -

I had find the reason. My ubuntu 18.04 /tmp is link to -> /home/work/tmp. Snap may note have permission in this way, so I rename tmp to tmp1,and mkdir a new tmp in root dir.
It works fine now

Did you system work fine until now?

Yes,the system is working fine