Kiauh/Klipper instalation script issue - permision denied

I’m using RaspberryPi Zero 2 W.
Installed DietPi and wanted to install Klipper (firmware for 3dprinter) on it.

When want to execute:


as root i have error generated by kiauh:


when im trying to run same scrip as dietpi user i’ve got:

bash: ./kiauh/ Permission denied

when adding sudo before ./kiauh/ once again have: !!! THIS SCRIPT MUST NOT RUN AS ROOT !!!
What can i do?


sudo chmod +x ./kiauh/

in case only root has execute permissions and assure that the script is located in a location where the dietpi user has access to.

script is located where dietpi user has no access… I mean its mine directory. I can’t even exceute ls command as dietpi user. When trying to get inside kiauh folder with cd I’ve got bash: cd: kiauh: Permission denied

PS. Is there an option to set dietpi user to behave as pi user on raspbian?

Try login as root or change to root when you logged in as dietpi user with su -, and then you can check the permissions of this directory with ls -la /path/to/kiauh. And you can also do then chmod +x /path/to/kiauh/

You could then change the ownership to dietpi, or add the owner to the dietpi group to get access, or add dietpi to the group of the file owner. I’m not sure what would be the best practice here :thinking:

Yes would be good to know where the script is located. Can you share the whole path Pls.

Kiauh/ are in main catalog.
When I’m logged as root and typing ls command i have only kiauh folder on the list

Looks like it is located on root user home directory. Of course user dietpi can’t access it there. You would need to move it somewhere else. Probably best to user dietpi home if you like to use this one to execute your script

Yes, it could be correct diagnose - when swapping user with sudo su dietpi and trying to excute git clone command I need add sudo at front. Will check that later then.

Try this as root user:

mv /root/kiauh /home/dietpi/kiauh
chown -R dietpi: /home/dietpi/kiauh

Then login as dietpi user an repeat ./kiauh/

Generally, when a script needs to be executed as non-root user, easiest is to clone it as non-root user in the first place.

1 Like

Everythings working correct now - i was loging as root, and then changing user with sudo su command. I logged as dietpi and everything is working. Feeling so stupid right now :cry: Sorry for wasting your time with so stupid question…

There are no stupid questions, we all started with no knowledge about these things and asked many many questions.
So don’t worry, this forum is exactly the right place for this questions :slight_smile:


So if there are no stupid question, i have the nex one.
On Klipper there is an option to install KlipperScreen.
When I’m installing it on Rasbian Lite to make it working on HDMI screen like this one:
i need to set GL driver to Legacy (in raspi-config). I was trying to make it working on DietPi, but don’t know which driver should I choose. With standard GL (kms and fkms) i had blackscreen. Terminal before Klipperscreen start is visible.

On DietPi legacy driver is used by default, but KMS may be enabled depending on what you installed. You can always disable KMS by removing the dtoverlay=vc4-kms-v3d line in /boot/dietpi.txt and reboot.