neovim / neovim-snap

snap build for neovim
https://snapcraft.io/nvim
MIT License
18 stars 7 forks source link

pipes not working correctly (missing permissions?) #25

Open rorojasq opened 1 year ago

rorojasq commented 1 year ago

Output from snap programs executed with the commands :! and :r ! is empty. Possibly because of this, LSP servers using nodejs will not work with the nodejs snap. Using io.popen to read a snap program output returns the expected result.

hurricanehrndz commented 1 year ago

PR are welcomed. I don't use the snap so can't troubleshoot.

mrcrgl commented 10 months ago

I have a similar problem. After switching to ubuntu/snap some installation routines are not working due to missing permissions to private-files.

If you, @rorojasq, are not already working on a solution, I`d try to.

Mason error:

  Failed
    ◍ css-lsp
      ▼ Displaying full log
        Initialized npm root.
        Installing npm package vscode-langservers-extracted@4.8.0…
        spawn: npm failed with exit code 243 and signal 0. 

AppArmor debug:

marc@monkey:/etc/apparmor.d$ sudo snappy-debug
INFO: Following '/var/log/syslog'. If have dropped messages, use:
INFO: $ sudo journalctl --output=short --follow --all | sudo snappy-debug
kernel.printk_ratelimit = 0
= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="net" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=1108244 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="net" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=1108269 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="file" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" name="/apparmor/.null" pid=1108244 comm="snap-confine" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
File: /apparmor/.null (write)
Suggestion:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="file" profile="snap.curl.curl" name="/apparmor/.null" pid=1108269 comm="snap-exec" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0
File: /apparmor/.null (write)
Suggestion:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="net" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=1108332 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="file" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" name="/apparmor/.null" pid=1108332 comm="snap-confine" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
File: /apparmor/.null (write)
Suggestion:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="net" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=1108390 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="file" profile="snap.curl.curl" name="/apparmor/.null" pid=1108390 comm="snap-exec" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0
File: /apparmor/.null (write)
Suggestion:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="net" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=1108424 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="file" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" name="/apparmor/.null" pid=1108424 comm="snap-confine" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
File: /apparmor/.null (write)
Suggestion:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="mknod" class="file" profile="snap.curl.curl" name="/home/marc/.local/share/nvim/mason/registries/github/mason-org/mason-registry/registry.json.zip" pid=1108390 comm="curl" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
File: /home/marc/.local/share/nvim/mason/registries/github/mason-org/mason-registry/registry.json.zip (write)
Suggestions:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON
* add 'personal-files (see https://forum.snapcraft.io/t/the-personal-files-interface for acceptance criteria)' to 'plugs'

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="net" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=1108484 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none

= AppArmor =
Time: 2024-01-05T14:4
Log: apparmor="DENIED" operation="file_inherit" class="file" profile="snap.curl.curl" name="/apparmor/.null" pid=1108484 comm="snap-exec" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0
File: /apparmor/.null (write)
Suggestion:
* adjust program to write to $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON
rorojasq commented 10 months ago

@mrcrgl If you can fix it, please do so! I tried to work on it but couldn't get lxd to work.

justinmk commented 1 month ago

Is there a permissions change needed in the snapcraft.yaml? Can someone send an update to https://github.com/neovim/neovim-snap/blob/master/snap/snapcraft.yaml