While developing the userspace program, I stumbled upon file permission problem:
a chardev is created with rw- --- --- permissions, so accessing /dev/fw_rules from the userspace prog results in Permission denied message.
After some time spent in searching for the solution on teh internet, there seems to be no way to programmatically change the permissions at the creation. (if i'm wrong, please point me to the right direction)
This is easily solved by running the userspace prog with sudo. There is another solution - creating more dev_attributes using sysfs, where I can control their permissions.
So, overall, after all this long introduction, my question is simple: will you run "sudo ./a.out <fw_command>" or without sudo ?
roeibh
Sun, 04/26/2015 - 10:06
Permalink
as i said in the lecture and sent you via email
i'm executing your user space programs with sudo