This is on ubuntu 18.04.1
lsd to give a listing
$ lsd
cannot open directory'.': Permission denied (os error 13)
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
Yes that works.
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 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
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.
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)
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.
I just got it "working" by installing it with --devmode.
$ sudo snap install lsd --devmode
If that helps
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.
Cheers, that's why I said "working", in inverted comma's
I have the same issue. Can't install the snap in classic mode.
Same issue with me. Ubuntu 18.04.
I have same issue on Ubuntu 18.04.
same issue here ubuntu 18.04
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.
I seriously dont know how to fix this issue... Does someone have some knowledges about the snap permissions system?
(I'm no snap expert!)
You have the snap set to strict confinement, which severely limits what it can access. You probably need to change it to classic, and make a request on forum.snapcraft.io for it to be granted classic status, which means it is essentially unconfined.
An example request: https://forum.snapcraft.io/t/request-for-classic-confinement-classic-snap-analyzer/5057
For debugging this sort of thing more generally, you can use sudo journalctl --output=short --follow --all | sudo snappy-debug which will give you suggestions of what might be needed:
Log: apparmor="DENIED" operation="open" profile="snap.lsd.lsd" name="/home/user" pid=8988 comm="lsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
File: /home/user/ (read)
Suggestion:
* add 'home' to 'plugs
You could add home to your plugs section as it suggests, but then you still wouldn't have access to non-home files, nor hidden files in the home directory.
@ralight that's too much to remember. Simply snappy-debug.security scanlog will suffice. ;-)
I'm just about to go look at the snapcraft.yaml to see what plugs are applied and will report back.
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
tangentially relevant https://tutorials.ubuntu.com/tutorial/continuous-snap-delivery-from-travis-ci
Hi everyone,
Thanks for the help, I will try your recommendations.
I will try the "home" and "removeable-media" plug for started but I think there will still have some issues with the /tmp folder for example.
This is still an unresolved issue.
I had the same issue on linux mint. It runs when installed with --devmode.
After installing with --devmode I have problems with icons, would this be unrelated?

@Peltoche When do you plan to release the fix (#207)?
This bug is fixed with version 0.15.0 on my machine.
This bug is fixed with version 0.15.0 on my machine.
\0/
So I guess the --classic is not more needed inside the README?
After installing with --devmode I have problems with icons, would this be unrelated?
Nop, this is due to a font issue. You need to download a nerd font and setup your terminal to use it. Cf the README.
That's correct. 馃憤
OK great thanks for the help with the icons.

Hi, althought I am on version 0.16.0 of lsd, on Ubuntu 1804, this issue came up with me :cry:
I have tried all method mentioned aboved but no one works for me.
Need help!
Hello @LeoJhonSong,
My guess is that you simply do not have the permissions to read the content of your folder /etc/ssl/certs I don't think this is linked to snap. In order to confirm this can you try to run /bin/ls /etc/ssl/certs, you should have a similar error.
If that's the case you will only have to run sudo lsd (or sudo ls) to see you folder content.
@Peltoche thanks for replying, but as you can see from my screenshot,I have already triedsudo lsd and it did not work...
Arf, indeed, my bad... And /bin/ls does work or not? Does lsd work with some another folder?
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:
:heavy_check_mark: /dev
:x: /etc
:heavy_check_mark: /home
:heavy_check_mark: /home/leo
:x: /home/leo/snap/gnome-calculator
:x: /home/leo/snap/gnome-system-monitor
:heavy_check_mark: /lib
:x: /media
:x: /media/Windows (this is the mounted partition of my Windows system)
:x: /mnt
:x: /opt
:heavy_check_mark: /proc
:x: /snap
:heavy_check_mark: /tmp
:x: /usr
:heavy_check_mark: /usr/bin
:x: /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 :+1:
Thanks for the tests. I'm a little lost too. I guess this is related to the snap jail. Can you try to re-install it with the --classic flag please? It should give it full access to the file system
@Peltoche Yep I have tried that but unfortunately I got the bug which you have worked on.

But with option --devmode it works well :man_shrugging:
Happened to me on a lot of different machines, have it installed either with snap or apt-get or make install, does not matter. Just now it happened again in just-cloned repository in /tmp/git-repo.
Recording here that this issue persists on Pop_OS 19.10(closely based on Ubuntu 19.10)
I got the same problem and solved by install tje package with dpkg.
I think I will end up by removing the package from snap and it will solve all the issues.
@Peltoche Hi as I found there is .deb package available, I uninstalled my lsd installed from snap and reinstalled lsd with the .deb package. And surprisingly lsd works really fine now:tada:
lsd now works fine with every path I mentioned above!
Hi, I have tested some more folders,
lsdwoorks with some of them, some not, while/bin/lswith all of them,sudois not needed for any folder. Here are my results forlsd:/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/shareThis seems quite confussing for me.. I believe there are more folders which
lsddoes not work with and just tell me if you want to check some more folders
Congratulation! :tada: I think we could close this issue now.
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
@Peltoche what's your idea? As we did not support snap anymore, shall we remove it?
I noticed that you are the developer for lsd on snapcraft, could you help to do this?
If this snap is not going to be updated to a version that works properly could you please remove it? It only causes confusion.
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
I see this same issue (permission denied) when using lsd on Ubuntu 20.04 on Windows (WSL).
I installed lsd, last release, with dpkg.
Just in case, I ran it with sudo (because the errors indicated "permission denied"). It still did not work. It took forever, and threw a few "No such file or directory (os error 2)" errors.
Most helpful comment
I just got it "working" by installing it with --devmode.
If that helps