In a native call, I\'m trying to open(\"/dev/video4\", O_RDWR) but I get errno EACCES 13 \"permission denied\".
If I run the same code* in an executable
The answers was not enough for me, so I left one more anwser. open API has more parameter 'mode'.
int open(const char *pathname, int flags, mode_t mode);
check out the link http://man7.org/linux/man-pages/man2/open.2.html
you might need to use 'open' with S_IRWXU option. like
open("/dev/video4", O_RDWR | O_CREAT, S_IRWXU )