Coder Social home page Coder Social logo

Comments (49)

wrapperband avatar wrapperband commented on May 12, 2024 15

I just got it "working" by installing it with --devmode.

$ sudo snap install lsd --devmode

If that helps

from lsd.

marxjohnson avatar marxjohnson commented on May 12, 2024 8

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

from lsd.

frankkusel avatar frankkusel commented on May 12, 2024 4

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)

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024 4

Hi @frankkusel and @marxjohnson ,

Thanks for the report!

I think I made some error in this commit -> 596d205
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.

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024 4

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

from lsd.

thexavier666 avatar thexavier666 commented on May 12, 2024 3

Same issue with me. Ubuntu 18.04.

from lsd.

jonas-frey avatar jonas-frey commented on May 12, 2024 3

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

from lsd.

wrapperband avatar wrapperband commented on May 12, 2024 2

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)

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024 2

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.

from lsd.

wrapperband avatar wrapperband commented on May 12, 2024 2

Cheers, that's why I said "working", in inverted comma's

from lsd.

lucyllewy avatar lucyllewy commented on May 12, 2024 2

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

from lsd.

meain avatar meain commented on May 12, 2024 2

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

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024 1

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

from lsd.

rubberneck avatar rubberneck commented on May 12, 2024 1

Yes that works.

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024 1

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.

from lsd.

Booteille avatar Booteille commented on May 12, 2024 1

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

from lsd.

vilhelmprytz avatar vilhelmprytz commented on May 12, 2024 1

I have same issue on Ubuntu 18.04.

from lsd.

airfield20 avatar airfield20 commented on May 12, 2024 1

same issue here ubuntu 18.04

from lsd.

krejcar25 avatar krejcar25 commented on May 12, 2024 1

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.

from lsd.

brennerm avatar brennerm commented on May 12, 2024 1

This bug is fixed with version 0.15.0 on my machine.

from lsd.

LeoJhonSong avatar LeoJhonSong commented on May 12, 2024 1

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 👍

from lsd.

LeoJhonSong avatar LeoJhonSong commented on May 12, 2024 1

@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 🤷‍♂️

from lsd.

bhechinger avatar bhechinger commented on May 12, 2024 1

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 lsd.

Peltoche avatar Peltoche commented on May 12, 2024

I seriously dont know how to fix this issue... Does someone have some knowledges about the snap permissions system?

from lsd.

ralight avatar ralight commented on May 12, 2024

(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

from lsd.

ralight avatar ralight commented on May 12, 2024

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.

from lsd.

lucyllewy avatar lucyllewy commented on May 12, 2024

@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.

from lsd.

kumavis avatar kumavis commented on May 12, 2024

tangentially relevant https://tutorials.ubuntu.com/tutorial/continuous-snap-delivery-from-travis-ci

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024

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.

from lsd.

kakasal avatar kakasal commented on May 12, 2024

This is still an unresolved issue.

from lsd.

hellerbenjamin avatar hellerbenjamin commented on May 12, 2024

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?

image

from lsd.

brennerm avatar brennerm commented on May 12, 2024

@Peltoche When do you plan to release the fix (#207)?

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024

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?

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024

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.

from lsd.

brennerm avatar brennerm commented on May 12, 2024

That's correct. 👍

from lsd.

hellerbenjamin avatar hellerbenjamin commented on May 12, 2024

OK great thanks for the help with the icons.

from lsd.

LeoJhonSong avatar LeoJhonSong commented on May 12, 2024

image

Hi, althought I am on version 0.16.0 of lsd, on Ubuntu 1804, this issue came up with me 😢
I have tried all method mentioned aboved but no one works for me.

Need help!

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024

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.

from lsd.

LeoJhonSong avatar LeoJhonSong commented on May 12, 2024

@Peltoche thanks for replying, but as you can see from my screenshot,I have already triedsudo lsd and it did not work...

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024

Arf, indeed, my bad... And /bin/ls does work or not? Does lsd work with some another folder?

from lsd.

Peltoche avatar Peltoche commented on May 12, 2024

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

from lsd.

iddm avatar iddm commented on May 12, 2024

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.

from lsd.

jsj1027 avatar jsj1027 commented on May 12, 2024

Recording here that this issue persists on Pop_OS 19.10(closely based on Ubuntu 19.10)

from lsd.

hegonfelipe avatar hegonfelipe commented on May 12, 2024

I got the same problem and solved by install tje package with dpkg.

from lsd.

LeoJhonSong avatar LeoJhonSong commented on May 12, 2024

@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, 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

Congratulation! 🎉 I think we could close this issue now.

from lsd.

zwpaper avatar zwpaper commented on May 12, 2024

@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?

from lsd.

davidromerot avatar davidromerot commented on May 12, 2024

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.

from lsd.

notjames avatar notjames commented on May 12, 2024

I just installed this tool last night. It's a great tool, but the greatness of it is moot if you can't list things you should be able to list. I installed it via snap and --classic did not fix the problem. BTW, I'm using Ubuntu 20.04.2 LTS.

from lsd.

meain avatar meain commented on May 12, 2024

The snap version has been discontinued and as of now we don't have any plans to update it. If you are using a ubuntu or any other debian derivative refer this section(https://github.com/Peltoche/lsd#on-ubuntu) of the readme on how to install lsd.


An app once published cannot be removed from the snap store. That is why it is still there.
https://forum.snapcraft.io/t/how-can-a-developer-remove-her-his-app-from-snap-store/512

from lsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.