Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can't start script with root privileges
subramanyag9112 last edited by subramanyag9112
Hi, My project is to build a network analyzer, so I had learnt qt now. I used scapy with qt, it's giving this error
File "/home/subramanyag/QtQuickApplication/main.py", line 30, in <module> main = MainWindow() File "/home/subramanyag/QtQuickApplication/main.py", line 14, in __init__ scapy.sniff(store=False, prn=self.process_sniffed_packet) File "/home/subramanyag/.local/lib/python3.8/site-packages/scapy/sendrecv.py", line 1263, in sniff sniffer._run(*args, **kwargs) File "/home/subramanyag/.local/lib/python3.8/site-packages/scapy/sendrecv.py", line 1127, in _run sniff_sockets[L2socket(type=ETH_P_ALL, iface=iface, File "/home/subramanyag/.local/lib/python3.8/site-packages/scapy/arch/linux.py", line 486, in __init__ self.ins = socket.socket( File "/usr/lib/python3.8/socket.py", line 231, in __init__ _socket.socket.__init__(self, family, type, proto, fileno) PermissionError: [Errno 1] Operation not permitted
I added sudo in Environment->System, but it's giving this error
QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000
Can u please help with that?
Hi and welcome to devnet,
Which IDE are you using to develop your application ?
What do you get if you do that from the command line ?
Since it looks like it's related to scapy rather than Qt, you might want to contact their authors.
Note: I forked your issue in its own thread because it was completely unrelated to the one you posted it on.