Hey, I am wondering what would be the correct way to read a file that requires admin permissions using Rust under Linux without running the entire application as root?
My current attempt is to just run sudo cat in a Command::new(), but this seems like a non-ideal way to handle this problem.
Please let me know if there are more idiomatic ways to handle this.
Have a nice day
Thank you, I did not know about capabilities.
I thought, maybe there would be a dedicated Rust crate or functionality to elevate privileges, that's why I posted here.