Hello, I am trying to run shell_exec("echo 1 > /sys/class/gpio/gpio3/value"). But it doesn't work and i think it's because of permissions, how do i set them without hurting security of the server?
I think i finally thought of a way, but then i have to go on each folder like /sys/class/gpio/gpio9 and type in "chmod -R www-data ." and i need this for quite some pins so i feel really stupid switching folders and typing the same thing... if i dont go on the specific folder it doesn't cover all subfiles, it's really weird. Could someone suggest a way to do it with proper recursion so i don't have to switch folders? Also it would be nice if someone approved if that's a safe way.