yq: cannot open files with sudo
Seems like opening a “root-only” file does not work with sudo.
E.g.:
$ sudo yq r /etc/netplan/50-cloud-init.yaml network.version
open /etc/netplan/50-cloud-init.yaml: permission denied
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (7 by maintainers)
@jeking3 - I know this is an old post, but I’ve just run up against the same issue; the problem is the snap sandbox.
As this bug report is pretty much the only search result for this problem, I’ll post this here anyway: The solution is to remove the sandboxed version and re-install the classic app version:
snap remove yq && snap install yq --classicHope that helps someone.
still reproing for me right now
Hi @mikefarah can we remove the guide for
snap install yqin README.md if it doesn’t work as described in this ticket?