Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium Kiosk - Permission Denied #3322

Closed
lasers opened this issue Jan 7, 2020 · 11 comments
Closed

Chromium Kiosk - Permission Denied #3322

lasers opened this issue Jan 7, 2020 · 11 comments
Labels
Milestone

Comments

@lasers
Copy link

lasers commented Jan 7, 2020

Creating a bug report/issue

Required Information

#!/bin/bash
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=28
G_DIETPI_VERSION_RC=0
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
  • buster 10.2
  • Linux dietpi-leaf 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
  • RPi 4 Model B (armv7l)
  • Raspberry Pi 15.3W USB-C Power Supply
  • SanDisk ultra

Steps to reproduce

  1. Install chromium kiosk on fresh install.
  2. Use user dietpi.

Expected behaviour

  • Start chromium kiosk.

Actual behaviour

  • Received /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh Permission denied on the screen.
@Joulinar
Copy link
Collaborator

Joulinar commented Jan 7, 2020

Hi,
pls try to run chromium as user root within the autostart option

@lasers
Copy link
Author

lasers commented Jan 7, 2020

This works fine. Thanks. I'm filing a bug because it doesn't work out of box with non-root. Also, chromium-browser takes up some of the screen similar to #2306. I'm just trying things right now.

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 7, 2020

hi, you would need to adjust Chromium resolution settings as follow nano /DietPi/dietpi.txt. Close to the bottom of the file you will find the following.

# Chromium options
SOFTWARE_CHROMIUM_RES_X=1280
SOFTWARE_CHROMIUM_RES_Y=720
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://dietpi.com

@lasers
Copy link
Author

lasers commented Jan 7, 2020

Ah I see. That's it. Thank you very much. 😊 I'll opt for minimal WM instead. I'll leave this issue open since I'm not sure if it's an issue that chromium-browser must be used with user root. Cheers.

@Joulinar
Copy link
Collaborator

Joulinar commented Jan 7, 2020

you can fix the access to the file. that's not the problem, but you will create new issues like Cannot open /dev/tty0 (Permission denied)

@MichaIng
Copy link
Owner

MichaIng commented Jan 8, 2020

@lasers
Many thanks for your report. Indeed the option to choose autologin user is relatively new and we did not yet auto-apply to required permissions to start certian applications, as also noted in dietpi-autostart GUI, AFAIK.

I'll check the required permissions for Chromium kiosk mode + GPU acceleration and implement/post here. Until then, choosing root will work.

@theiconrichie
Copy link

I have root set, and i get no such file found. doesnt work for me and the pi zero is so slow it cant run chromium on a X desktop at all.

@Joulinar
Copy link
Collaborator

@theiconrichie
pls can you past ls -l /var/lib/dietpi/dietpi-software/installed/

@promofu
Copy link

promofu commented Feb 12, 2020

I just had a similar issue and looked for file permissions along the path and
found that /var/lib/dietpi allthough being a directory was set to 660 instead of at least 770.

Maybe that helps ?

MichaIng added a commit that referenced this issue Feb 13, 2020
+ DietPi-PREP | Fix DietPi directory permissions: #3322 (comment)
@MichaIng
Copy link
Owner

@promofu
Many thanks for reporting.
You're right, we assign this wrong during image creation 😓: 8f28f23
I'll add this to v6.29 patch + MOTD live patch until then.

@MichaIng MichaIng added this to the v6.29 milestone Feb 13, 2020
MichaIng added a commit that referenced this issue Mar 18, 2020
+ DietPi-Patch | During image preparation we set /var/lib/dietpi permissions to 660, including the directories. This breaks non-root users from executing contained scripts, e.g. /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh: #3322
@MichaIng
Copy link
Owner

Fixed: d6cfa30
MOTD hack:

# - https://github.com/MichaIng/DietPi/issues/3322
[[ $UID == 0 ]] && chmod -f +x $(find /var/lib/dietpi -type d) /var/lib/dietpi/services/*sh /var/lib/dietpi/dietpi-software/installed/*sh

Changelog: 363533b

@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Mar 18, 2020
@MichaIng MichaIng mentioned this issue Mar 30, 2020
@MichaIng MichaIng mentioned this issue May 3, 2020
@MichaIng MichaIng closed this as completed May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants