PermissionError when Pingtop is executed without sudo
See original GitHub issueHi, Beautiful and useful tool! However I am having a similar problem to #5, but it is already fixed and seems a bit different to this one I am reporting.
I installed it with pip install pingtop
. Then I ping baidu.com with pingtop baidu.com
but it doesn’t work, I get this error:
ERROR:root:[Errno13]: Permiso denegado
[...]
PermissionError: [Errno13] Permiso denegado
I can’t copy the error, so I am going to attach a screenshot.
I achieve to run it thanks to the comment of @laixintao in the mentioned issue, I mean making a which pingtop
to get the path in which it is installed and then using sudo PATH baidu.com
.
Is there some reason to run it as super user? Or, could it be fixed?
Regards
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Why i can't do some things without sudo using Python and pip?
The reason is that your regular user doesn't have the permissions needed to modify the system directories. Just like in this message:
Read more >Permissions error when installing without sudo #11 - GitHub
An alternative solution is to make a system package installable via the systems own package manager (would be apt-get in this case).
Read more >Why is sudo required for every sudo executed executable?
Explanation. When you execute a command with sudo it just means that the user that is executing that command is root .
Read more >How can I run this command without the use of sudo?
I'm trying to do the same, accessing this file from a shell script. Nothing works, even setting u+s permissions to the shell script....
Read more >Bug #1300948 “aa-genprof crashed with PermissionError in ...
running aa-genprof without sudo made the crash. ProblemType: Crash DistroRelease: Ubuntu 14.04 Package: apparmor-utils 2.8.95~2430-0ubuntu3 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @ivanhercaz , we use ICMP socket to send ICMP packet without root.
However, there is a option control who can use this feature.
This means group number from
1
to0
can use this feature, which means nobody can use this, so you get aPermission denied
.Solution
Change this variable to a proper range include your group id, like this:
Then you can use this without sudo.
Apologize for the delay, I just realize my PR only granted non-root support for OS X, Linux is a bit tricky. One way to work around here is, like @laixintao indicated, set the ping_group_range. Also, there’s a bug in receive_one_ping func, will submit a PR to fix this.
For example, if your uid is 1234,
Not sure if it is the best practice here.