Hello DietPi-Team,
short:
KODI won’t start with user dietpi from dietpi autostart.
All I get is many of:
/usr/bin/kodi: 94: cannot create /home/dietpi/kodi_crashlog-20231231_202612.log: Permission denied
/usr/bin/kodi: 95: cannot create /home/dietpi/kodi_crashlog-20231231_202612.log: Permission denied
/usr/bin/kodi: 96: cannot create /home/dietpi/kodi_crashlog-20231231_202612.log: Permission denied
/usr/bin/kodi: 97: cannot create /home/dietpi/kodi_crashlog-20231231_202612.log: Permission denied
/usr/bin/kodi: 98: cannot create /home/dietpi/kodi_crashlog-20231231_202612.log: Permission denied
/usr/bin/kodi: 99: cannot create /home/dietpi/kodi_crashlog-20231231_202612.log: Permission denied
If I set it to root, it starts but I don’t want to run KODI as root.
What can I do, to let KODI run as dietpi user?
Best regards,
Chris
probably user dietpi
needs to be added to video group
It is already in video group:
dietpi@DietPi:~$ groups dietpi
dietpi : dietpi tty audio video input render
CuriousCat:
/usr/bin/kodi
can you share full output if you run /usr/bin/kodi
as user dietpi
from CLI
It’s the same like from autostart:
/usr/bin/kodi: 94: cannot create /home/dietpi/kodi_crashlog-20240102_141511.log: Permission denied
/usr/bin/kodi: 95: cannot create /home/dietpi/kodi_crashlog-20240102_141511.log: Permission denied
/usr/bin/kodi: 96: cannot create /home/dietpi/kodi_crashlog-20240102_141511.log: Permission denied
/usr/bin/kodi: 97: cannot create /home/dietpi/kodi_crashlog-20240102_141511.log: Permission denied
/usr/bin/kodi: 98: cannot create /home/dietpi/kodi_crashlog-20240102_141511.log: Permission denied
/usr/bin/kodi: 99: cannot create /home/dietpi/kodi_crashlog-20240102_141511.log: Permission denied
What if I would purge the installation from the DietPi-Menu and install it with User dietpi from CLI?
trendy
January 2, 2024, 5:01pm
6
Which user is running kodi? ps -ef | grep kodi
To which groups does he belong? groups "$(ps -ef | grep bash | head -n 1 | cut -d " " -f 1)"
What are the permissions of the folder? ls -lah /home/dietpi/
should be user dietpi
. However, Kodi is not starting at all due to some issues with non-root user.
dietpi@DietPi:~$ ps -ef | grep kodi
dietpi 4684 4658 0 18:24 pts/4 00:00:00 grep kodi
dietpi@DietPi:~$ groups "$(ps -ef | grep bash | head -n 1 | cut -d " " -f 1)"~
groups: ‘dietpi~’: no such user
dietpi@DietPi:~$ ls -lah /home/dietpi/
total 48K
drwxr-xr-x 7 root root 4.0K Dec 31 18:07 .
drwxr-xr-x 4 root root 4.0K Nov 23 20:46 ..
-rw-r--r-- 1 root root 231 Dec 30 20:53 .bash_history
-rw-r--r-- 1 root root 220 Apr 23 2023 .bash_logout
-rw-r--r-- 1 root root 571 Nov 23 20:46 .bashrc
drwxr-xr-x 3 root root 4.0K Dec 31 15:31 .cache
drwxr-xr-x 4 root root 4.0K Dec 31 15:31 .config
drwxr-x--- 8 root root 4.0K Dec 31 18:08 .kodi
drwxr-xr-x 8 root root 4.0K Dec 31 15:31 .kodiFRESHHH
drwxr-xr-x 3 root root 4.0K Dec 31 15:34 .local
-rw-r--r-- 1 root root 161 Nov 23 20:46 .profile
-rw-r--r-- 1 root root 66 Dec 30 20:42 .selected_editor
Does it have something to do, that I’ve installed it at “First Run” with the needed user root?
WTF?? The whole directory and files are owned by user root
. I doubt this happen because of kodi. At least it explains the permission issue very well. User dietpi
should own all the profile files like this:
root@DietPiProd:~# ls -la /home/dietpi/
total 28
drwxr-xr-x 2 dietpi dietpi 4096 Jan 27 2023 .
drwxr-xr-x 3 root root 4096 Feb 24 2023 ..
-rw------- 1 dietpi dietpi 482 Feb 24 2023 .bash_history
-rw-r--r-- 1 dietpi dietpi 220 Aug 4 2021 .bash_logout
-rw-r--r-- 1 dietpi dietpi 571 Aug 8 2021 .bashrc
-rw-r--r-- 1 dietpi dietpi 161 Aug 8 2021 .profile
-rw-r--r-- 1 dietpi dietpi 1684 Jan 26 2023 influxdata-archive_compat.key
root@DietPiProd:~#
Something you would need to change
chown -R dietpi:dietpi /home/dietpi/
2 Likes
Ohhh… yes… now I see it too!
Thats strange!
I didnt changed something…
All I did was a fresh install, configuring the “First Steps” via SSH and installed KODI from your list.
Now it works!!!
Many thanks, Joulinar!!!
1 Like
system
Closed
April 1, 2024, 7:18pm
11
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.