Opening GPIO: opening 'export': Permission denied [errno 13]
Dear,
Thank you in advance for your help.
Regards
Laurent
I try desperately to use the GPIO port of my RockPI4B which runs under Armbian with Repetier-Server Pro 1.4.2 but without success, I always have the following message which is displayed "Opening GPIO: opening 'export': Permission denied [errno 13]", can someone help me to give the necessary permissions to 'export'?
Thank you in advance for your help.
Regards
Laurent
Comments
ls -l /sys/class/gpio/gpiochip0/
to see which group is allowed to access the pins. For pi it is group gpio which is no problem because repetierserver is member of that group. If your linux uses a different group for this you might need to add repetierserver to that group to get permission.
Thanks for your help.
With ls -l /sys/class/gpio/gpiochip0/ I have this:
I also add repetierserver in gpio and laurent groupe but without any success, same error "Opening GPIO: opening 'export': Permission denied [errno 13]".
Hereunder the groupe list.
you see the second name in ls -l output is the group which is here gpio. On your linux these files belong to group root, which is why you get permission denied. You can test if assigning group root to repetierserver helps here. But as you see the group user has not write permissions to the files so I think it will not help. You would need to start server as user root to get access here or find out how to change group and group permissions.
You can do so in service but note that updating server will overwrite your changes and you have to repeat them. The service file is
/lib/systemd/system/RepetierServer.service
and contains this:
You need to change User and also the chown command to use root instead of repetierserver than server runs as root after service restart:
sudo systemctl daemon-reload
sudo service RepetierServer restart
Thanks for your help, the error message disappeared by following your instructions, thank you for your help.
Question: If during the installation of Armbian, I set the user "PI" from the start, will this save me all these problems?
Many thanks again for your help and responsiveness.
Regards
Laurent