lwc:linux:snap

  • Snap runs in a sandbox.
  • Permissions of the sandbox are defined in the package itself
  • when possible install from channel --stable which typically offers the app enough permissions to run normally
  • if not possible to install as stable install with devmode to be able to read files…or something
  • it appears Snap apps can't even see certain directories like /tmp and /home. Symlinks don't fix the problem. Instead the files need to be copied somewhere else, such as /var/tmp
  • Mount the directory inside home. Example with /tmp:
mkdir /home/you/tmp
sudo mount --bind /tmp /home/you/tmp/
  • make permanent by editing /etc/fstab:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/tmp        /home/you/tmp   auto    bind    0   3
  • then rebuild the initrd:
sudo update-initramfs -u -k all

source

  • lwc/linux/snap.txt
  • Last modified: 2023/01/16 07:21
  • by John Harrison