Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

orangepi zero plus "chown" permission change is not permanent

Featured Replies

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

 

 

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.

 

 

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

 

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

 

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.