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

/boot/dietpi/func/dietpi-banner: line 222: /run/dietpi/.dietpi_motd: Permission denied #3548

Closed
Sopor opened this issue May 19, 2020 · 9 comments
Labels
Solution available 🥂 Definite solution has been done
Milestone

Comments

@Sopor
Copy link

Sopor commented May 19, 2020

Creating a bug report/issue

I updated DietPi today from v6.28.0 and now i will see this message when i run diet-pi-login

 ─────────────────────────────────────────────────────
 DietPi v6.30.0 : 00:18 - Wed 20/05/20
 ─────────────────────────────────────────────────────
 - Device model : RPi 2 Model B (armv7l)
 - Uptime : up 27 weeks, 1 day, 21 hours, 55 minutes
 - CPU temp : 44'C : 111'F (Optimal temperature)
 - LAN IP : 192.168.0.10 (eth0)
/boot/dietpi/func/dietpi-banner: line 222: /run/dietpi/.dietpi_motd: Permission denied
 ─────────────────────────────────────────────────────

Required Information

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=6
    G_DIETPI_VERSION_SUB=30
    G_DIETPI_VERSION_RC=0
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'

  • Distro version | echo $G_DISTRO_NAME or cat /etc/debian_version
    stretch | 9.11

  • Kernel version | uname -a
    Linux DietPi 4.19.66-v7+ DietPi-Config | CPU performance benchmark #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    < EMPTY > | RPi2

  • Power supply used | (EG: 5V 1A RAVpower)
    I don't know

  • SDcard used | (EG: SanDisk ultra)
    SanDisk

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. Run /DietPi/dietpi/dietpi-login
  2. ...

Expected behaviour

  • ...

Actual behaviour

  • ...

Extra details

  • ...
@Joulinar
Copy link
Collaborator

hi,

many thanks for your report. Pls can you try to login as user root

@Sopor
Copy link
Author

Sopor commented May 19, 2020

If i run as sudo it seems to work

 MOTD : Check your kernel error logs from time to time: dmesg -l err,crit,alert,emerg

@Pisgah
Copy link

Pisgah commented May 20, 2020

An answer may be found here :
https://dietpi.com/phpbb/viewtopic.php?f=10&t=7637&p=24644&hilit=banner#p24644

See the links inside.

@MichaIng
Copy link
Owner

The issue is solved with a reboot, indeed the correct directory permissions were not applied with update directly (but via tmpfiles from next boot on). This solves it (otherwise a reboot):

chmod 777 /run/dietpi

Enhanced for next update: 99caec8

@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Investigating 🤔 labels May 20, 2020
@MichaIng MichaIng added this to the v6.31 milestone May 20, 2020
@Sopor
Copy link
Author

Sopor commented May 22, 2020

@MichaIng Now when i run diet-pi-login i do get a motd. I haven't done anything and the chmode is 0644 on .dietpi_motd and 0666 on .network. Why does it work now?

@MichaIng
Copy link
Owner

@Sopor
Yes it is only a one-time issue during the update. I hence mark this issue as closed. Feel free to reopen if required.

@Sopor
Copy link
Author

Sopor commented May 24, 2020

@MichaIng Yes, but i haven't rebooted or even logged out from my terminal, so how can it suddenly work now?

@MichaIng
Copy link
Owner

@Sopor
I guess the MOTD was not yet downloaded when banner was called with non-root user. Then you called it with sudo, so the MOTD was downloaded and the non-root user didn't need to anymore. Daily at night the current MOTD is removed and freshly downloaded via cron job as root user, so then the issue cannot occur anymore. On next reboot the tmpfiles creation applies the correct permissions.

@Sopor
Copy link
Author

Sopor commented May 25, 2020

Thanks for explaining, @MichaIng ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

4 participants