-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission denied to read file #1519
Comments
Thanks for taking the time to report a bug! I have a handful of questions:
|
I'm pretty sure this is the problem. Others had similar issues when installing from snap (#1424). FYI @purveshpatel511 To be honest, I am considering to remove the snap install instructions from the README. I don't want users to go through this experience. I remember that ripgrep did something similar because they encountered too many bugreports concerning wrong permissions. Unless that problem can be fixed in the snap package itself (classic confinement), I would discourage from installing via snap. @barenko Could you try to install Edit: Quoting from the ripgrep README (see BurntSushi/ripgrep@6ffb4b7):
|
Hi @sharkdp , the snap really is the problem. I reinstalled the |
As discussed in sharkdp#1519, the batcat snap package is too problematic for official endorsement, so withdraw recommendation from README.me (and remove section from CHANGELOG.md since a release with it has not been made yet).
As discussed in #1519, the batcat snap package is too problematic for official endorsement, so withdraw recommendation from README.me (and remove section from CHANGELOG.md since a release with it has not been made yet).
I have this problem too
|
@pjgoodall Try one of the recommended installation methods instead of installing from snap: https://github.com/sharkdp/bat#installation |
@pjgoodall , Or reinstall snap using following command,
|
There is no apt package for batcat, for Ubuntu 20.04 which is why I used snap - which is on the list I think. Snap is for a number of serious sub-systems on Ubuntu, such as LXD. It is a bug that the snap doesn’t work. |
@Enselic, I am a maintainer of snap package and I tried to resolve this permission issue but not getting positive response from review-team of snapstore. So, i pulled down release of |
@purveshpatel511 Thank you for your efforts to try to build a working snap package. Sorry to hear it is difficult to make it work well. I think we should keep the section in the README that advices against using the snap package, because I’m sure it will stay around in one way or another even if you pulled it from the store. |
Thank you @purveshpatel511. I think that's the best option for now. It looks like the snap package is still available though? https://snapcraft.io/batcat |
@Enselic and @sharkdp, Thanks for support.
I already pulled down all the release of the package but user with the URL can still access the web-page but cannot able to install the package. Also i listed snap to private so no new user can find it in a store. Here, you can check that out, https://snapcraft.io/search?q=batcat I checked out above installation information and found that there has approx 19 Linux distribution that not got the latest stable release(v0.18.2) of the package including Ubuntu, Fedora, Kali, Debian, openSUSE and Alpine. And we can resolve this with snap package. What am I proposing? You can list this snap package in your release page and direct snap lovers to download and install snap from your release page. User can install this package with following command, Bit information about the flags, By using this snap package, we can also resolve the previous issues #1424. Also i can build snap for different architecture including arm64, armhf, i386 and amd64. Give it a try. If you guys find this useful then we can work ahead. |
What version of
bat
are you using?bat 0.17.1
Describe the bug you encountered:
I Have a file with read permission:
.rw-r--r-- 7,0k myuser 14 Jan 23:16 .zshrc
I tried to read normally (with the file owner)
batcat .zshrc
[bat error]: '.zshrc': Permission denied (os error 13)
I retried using sudo:
sudo batcat /home/myuser/.zshrc
[bat error]: '/home/myuser/.zshrc': Permission denied (os error 13)
...
What did you expect to happen instead?
show the file contents
...
How did you install
bat
?using the snap package
Environment
system
$ uname -srm
Linux 5.4.0-26-generic x86_64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20
Release: 20
Codename: ulyana
bat
$ batcat --version
bat 0.17.1
$ env
PAGER=less
bat_config
bat_wrapper
No wrapper script for 'bat'.
No wrapper script for 'batcat'.
bat_wrapper_function
No wrapper function for 'bat'.
No wrapper function for 'cat'.
No wrapper function for 'batcat'.
tool
$ less --version
less 551 (GNU regular expressions)
The text was updated successfully, but these errors were encountered: