lsd: snap version gets "Permission denied"

This is on ubuntu 18.04.1

Expected behavior

lsd to give a listing

Actual behavior

$ lsd
cannot open directory'.': Permission denied (os error 13)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 17
  • Comments: 49 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I just got it “working” by installing it with --devmode.

$ sudo snap install lsd --devmode

If that helps

I’m having the same issue on Ubuntu 18.04. Trying to install with --classic doesn’t help:

mark@coachz:~$ sudo snap install lsd --classic
Warning: flag --classic ignored for strictly confined snap lsd

I think I will end up by removing the package from snap and it will solve all the issues.

Hi @frankkusel and @marxjohnson ,

Thanks for the report!

I think I made some error in this commit -> https://github.com/Peltoche/lsd/commit/596d20500ea1beefb3049e88d19827af9379b2e2 I move the confinement from strict to classic. Hoping to be able to remove the --classic option but it appear I was wrong…

I fix that ASAP.

Hello. I have the same problem as the OP, but the problem does not go away with the “–classic” addition to the install command. (I’m using Ubuntu 18.04.2)

I’m using kubuntu 20.20, and the buggy lsd is still available through snap. Can you please remove it? I think that would save a lot of people the trouble of rediscovering the problem and eventually switching to the deb

Same issue with me. Ubuntu 18.04.

From what I could understand, an app once published cannot be removed from the snap store. https://forum.snapcraft.io/t/how-can-a-developer-remove-her-his-app-from-snap-store/512

right, @Peltoche , so you don’t define any plugs in .snapcraft.yaml, so there are no permissions granted to your snap meaning it can only do things within itself.

apps:
  lsd:
    command: bin/lsd

You likely need at the minimum home to allow users to access files in their home folders:

apps:
  lsd:
    command: bin/lsd
    plugs:
      - home

You can also allow access to removable disks with removable-media:

apps:
  lsd:
    command: bin/lsd
    plugs:
      - home
      - removable-media

Cheers, that’s why I said “working”, in inverted comma’s

Hi @wrapperband ,

Thanks for the input but I don’t think it’s a good practice to install with the devmode because you remove all the jail limitations. On only need a full access to the filesystem but we don’t need the access to the network for example.

I’m having the same issue with Ubuntu 18.10 and lsd 0.13.0

sudo snap install lsd --classic Warning: flag --classic ignored for strictly confined snap lsd

and

$ lsd cannot open directory’.': Permission denied (os error 13)

and

$ sudo lsd cannot access ‘.’: Permission denied (os error 13)

If this snap is not going to be updated to a version that works properly could you please remove it? It only causes confusion.

@Peltoche Yep I have tried that but unfortunately I got the bug which you have worked on. image

But with option --devmode it works well 🤷‍♂️

Hi, I have tested some more folders, lsd woorks with some of them, some not, while /bin/ls with all of them, sudo is not needed for any folder. Here are my results for lsd:

✔️ /dev/etc ✔️ /home ✔️ /home/leo/home/leo/snap/gnome-calculator/home/leo/snap/gnome-system-monitor ✔️ /lib/media/media/Windows (this is the mounted partition of my Windows system) ❌ /mnt/opt ✔️ /proc/snap ✔️ /tmp/usr ✔️ /usr/bin/usr/share

This seems quite confussing for me… I believe there are more folders which lsd does not work with and just tell me if you want to check some more folders 👍

This bug is fixed with version 0.15.0 on my machine.

I can confirm it, I am on Ubuntu Server 18.04.2. --classic option didn’t help, managed to get it installed and working with the --devmode as @wrapperband said.

same issue here ubuntu 18.04

I have same issue on Ubuntu 18.04.

I have the same issue. Can’t install the snap in classic mode.

Hi @wrapperband ,

Thanks for the report, I reopen the issue.

It’s curious because this solution to worked previously. I need to dig a little more into the snap documentation.

Yes that works.

Hi @rubberneck,

Thanks for the report! As each snap run into a specific namespace (or vm I really don’t master the subject) it possible that your lsd doesn’t have access to your filesystem.

Can you try to reinstall it with the --classic option?

sudo snap remove lsd
sudo snap instal lsd --classic