Siraj Posted April 10, 2020 Posted April 10, 2020 I am changing the file/folder permission using chown but is it not permanent chown proxy:proxy a.log ls -l total 0 -rw-r--r-- 1 proxy proxy 0 Apr 10 07:30 a.log Now after some time that include reboot ls -l total 0 -rw-r--r-- 1 root root 0 Apr 10 07:30 a.log I am using armbian on orange pi zero plus uname -r 5.4.14-sunxi64 0 Quote
Werner Posted April 10, 2020 Posted April 10, 2020 Providing armbianmonitor -u would be a good start... 0 Quote
Siraj Posted April 10, 2020 Author Posted April 10, 2020 45 minutes ago, Werner said: Providing armbianmonitor -u would be a good start... http://ix.io/2hrw 0 Quote
Igor Posted April 10, 2020 Posted April 10, 2020 2 hours ago, Siraj said: I am using armbian on orange pi zero plus It seems you down't have up-to-date BSP packages. We had a bug but it was fixed https://github.com/armbian/build/commit/faa9a74719fb09d78a657052b752336e5a39e37d#diff-c2a9f316953da336acbe0309d3a06db6 0 Quote
Siraj Posted April 10, 2020 Author Posted April 10, 2020 4 minutes ago, Igor said: It seems you down't have up-to-date BSP packages. We had a bug but it was fixed https://github.com/armbian/build/commit/faa9a74719fb09d78a657052b752336e5a39e37d#diff-c2a9f316953da336acbe0309d3a06db6 yes very true, its old one. and thanks 0 Quote
Ramon Posted March 18, 2021 Posted March 18, 2021 Hello... I still have this problem. I'm running the latest armbian kernel (5.10.21-sunxi). I've followed this tutorial GPIO Permission Denied - Raspberry Pi Forums As soon as I reboot the Orange Pi, it return the gpio groups to root and delete the "echoed" pins (in my case, pin20). Thanks in advance. 0 Quote
tparys Posted March 20, 2021 Posted March 20, 2021 Hi Ramon, This is actually a different problem, in that /sys (sysfs) is a virtual filesystem and not actually something on the SD card. In that sense, there's nothing to save boot-to-boot. It's also a deprecated interface, so you may just want to look into the newer interface. If you do want to use the GPIO that way, you can do one of a few things: Make a script that configures your GPIO on every boot (such as rc.local) Write a udev rule that sets ownership of gpio files in sysfs Just run your application with setuid root privileges 1 Quote
tparys Posted March 21, 2021 Posted March 21, 2021 As a kick in the right direction, I have this in "/etc/udev/rules.d/50-gpio.rules". KERNEL=="gpio*", GROUP="users" Then need to trigger udev, or reboot. Afterwards ... tparys@hobbes:~$ ls -l /dev/gpiochip* crw-rw---- 1 root users 254, 0 Mar 20 20:58 /dev/gpiochip0 crw-rw---- 1 root users 254, 1 Mar 20 20:58 /dev/gpiochip1 crw-rw---- 1 root users 254, 2 Mar 20 20:58 /dev/gpiochip2 crw-rw---- 1 root users 254, 3 Mar 20 20:58 /dev/gpiochip3 crw-rw---- 1 root users 254, 4 Mar 20 20:58 /dev/gpiochip4 Then make sure gpiod is installed (sudo apt-get install gpiod). Then do something like this, or read man pages for gpioget / gpioset. # Reading GPIO chip 1, line 3 gpioget 1 3 # Setting that GPIO to 1 (high gpioset 1 3=1 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.