Os permission error when trying to create a `tun` device

1.8k views Asked by At

I'm trying to create a tun device with rust's tun_tap create, I'm following documentation and trying to create an interface with the tun_tap::Iface::new(..);, but I'm getting the error below.

Error: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }

I'm running Ubuntu 20.04 Lts version on this machine, How can I run this code without giving it root permission? Is this anything that I can do with the code or with Linux permission itself? any ideas would be appreciated ;)

0

There are 0 answers