Comments (10)
@helixzz thanks for trying. I guess I need to add it to here first and release it:
Lines 73 to 76 in fe534c2
I also need to request auto-connect permission for this plug on the snapcraft forum.
Leave it with me and I’ll figure out what is needed.
from trippy.
I am able to reproduce the issue on a ubuntu instance.
I added the home
interface to trippy (in #1059) and this was built and released to the edge
channel (revision 2643 for amd64).
I switched to the edge
channel and refreshed:
snap-id: MuyJc7aas4HVkKbWZclsIhu0R9WAjX50
tracking: latest/edge
refresh-date: today at 13:00 UTC
channels:
latest/stable: 0.9.0 2023-11-30 (1943) 3MB -
latest/candidate: ↑
latest/beta: ↑
latest/edge: 0.9.0 2024-03-21 (2643) 3MB -
installed: 0.9.0 (2643) 3MB -
I connected the (now available) home
interface:
fuji@trippy-dev:~$ sudo snap connections trippy
Interface Plug Slot Notes
home trippy:home :home -
network trippy:network :network -
network-bind trippy:network-bind :network-bind -
network-observe trippy:network-observe :network-observe -
But it still does not work:
fuji@trippy-dev:~$ sudo trip 1.1.1.1 --config-file /home/fuji/trippy.toml
Error: config file not found: "/home/fuji/trippy.toml"
Caused by:
Permission denied (os error 13)
The same message is given for files that do not exist:
fuji@trippy-dev:~$ sudo trip 1.1.1.1 --config-file /home/fuji/doesnotexist.toml
Error: config file not found: "/home/fuji/doesnotexist.toml"
Caused by:
Permission denied (os error 13)
I tried from /tmp
as well but that does not work either (which seems expected), however it fails with a different error (the files does exist in this case):
fuji@trippy-dev:~$ sudo trip 1.1.1.1 --config-file /tmp/trippy.toml
Error: config file not found: "/tmp/trippy.toml"
Caused by:
No such file or directory (os error 2)
Aside, note that I used a non-hidden file and dirs above as the home
interface only claims to allow access to non-hidden files. For hidden files it seems another interface, personal-files
is needed. However I haven't tried this since I have not even been able to get the non-hidden files to work so far. There is also a removal-media
interface which may be needed.
I'll post a question on the snapcraft forum as i'm not a regular snap user or expert and the solution is not obvious.
from trippy.
Added #1062 to allow running via snap
without requiring sudo such that the home
and personal-files
interfaces will allow access to configuration files in the /home
of the original user rather than the home of the root
user.
Edit: this does not help, snap
requires elevated privileges even when the network-observe
interface is connected.
from trippy.
Sorry was travelling I knew about this limitation of not being able to access files in folders that start with a dot because Firefox which is installed via Snap by default now on Ubuntu also has the same issue.
from trippy.
Thanks for the report @helixzz.
I suspect trippy needs to connect to the home
interface to allow this.
if you connect it manually (as described in https://snapcraft.io/docs/home-interface) does that fix the issue?
if so I will ask for that interface to be added to the snap for the nest version.
from trippy.
Thanks for the report @helixzz.
I suspect trippy needs to connect to the
home
interface to allow this.if you connect it manually (as described in https://snapcraft.io/docs/home-interface) does that fix the issue?
if so I will ask for that interface to be added to the snap for the nest version.
Thanks for your reply!
I've tried sudo snap connect trippy:home :home
and it seems produces an error: error: snap "trippy" has no plug named "home"
. Maybe I haven't get the correct command line?
from trippy.
Posted: https://forum.snapcraft.io/t/access-config-file-from-snap/39418
from trippy.
@helixzz if you are following the thread on the snapcraft forum, there is a solution to allow trippy (or any snap really) to read files from $HOME (that is blocked by default). The catch is it doesn't support hidden files or directories and so you'd need to place your trippy.toml
file in your $HOME directory. Not a perfect solution but that appears to be the best we can do within the constraints of snap.
The snap config change to allow this will be included in 0.10.0 release of Trippy (due very soon).
from trippy.
I'm awaiting the change to be approved by the snap folk and without that the 0.10.0
release will not be available in the snap store. Rather than block the whole Trippy release (which I'm planning to do today) i'm going to go ahead and close this issue and add it to the 0.10.0
release note as completed. Once the approval happens I can release 0.10.0
to the snap store.
from trippy.
@helixzz Trippy 0.10.0 has finally been released on snap and supports the ability to read (non-hidden) configuration files.
from trippy.
Related Issues (20)
- Tracer panic for ICMP TimeExceeded packets with code 1 ("Fragment reassembly time exceeded")
- Tracer debug_asset failure for UDP protocol
- Packet size minimum incorrect for IPv6
- Restrict flows to Paris and Dublin strategies
- Add support for more named colors
- TUI settings columns visibility and ordering
- Crash (`STATUS_ACCESS_VIOLATION`) during simulation tests on Windows when tracing enabled HOT 1
- TUI displaying 0.0 on No Response for javg and jmax
- Add flag to bypass platform privilege checks HOT 1
- Reduce MAX_SEQUENCE_PER_ROUND from 1024 to 512
- 0.10.0 Release Testing HOT 1
- No color in the circles under Sts column (Windows) HOT 2
- Publish PPA automatically HOT 1
- Trippy don't work on Archlinux
- Detect NAT for `udp/dublin` strategy HOT 1
- Add last icmp packet type column
- Add last icmp packet code column
- Separate lib and bin dependencies HOT 5
- Improve error messages HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trippy.