[Bug 1873545] Re: Permission denied error from show-motd when updates available
Ryan Finnie
1873545 at bugs.launchpad.net
Mon Jul 6 17:30:49 UTC 2020
This fails when logging in from the console (see below). Doesn't appear
to be affected when logging in via SSH.
The check should probably be [ -z "$EUID" -o "$EUID" -ne 0 ].
Ubuntu 20.04 LTS riscv64-dev ttyS0
riscv64-dev login: ryan
Password:
/etc/update-motd.d/91-release-upgrade: 9: [: Illegal number:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-28-generic riscv64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 updates can be installed immediately.
0 of these updates are security updates.
Last login: Mon Jul 6 17:24:50 UTC 2020 on ttyS0
ryan at riscv64-dev:~$
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1873545
Title:
Permission denied error from show-motd when updates available
Status in Release Upgrader:
Fix Released
Status in Ubuntu WSL:
Fix Released
Status in ubuntu-release-upgrader package in Ubuntu:
Fix Released
Status in ubuntu-release-upgrader source package in Focal:
Fix Committed
Status in ubuntu-release-upgrader source package in Groovy:
Fix Released
Bug description:
[Impact]
* This impacts focal (20.04 LTS) users on WSL. On WSL version of
Ubuntu 20.04, on the first time of the launch in a day, the MOTD will
show. This error will show if apt gets update but packages are not
upgrade.
[Test Case]
* Install Ubuntu/Ubuntu 20.04 LTS from Microsoft Store and setup a
user.
* `sudo apt update` and remove `~/.motd_shown`, quit and terminate the
running distribution by `wsl.exe -t <distro>`.
* Restart the distribution, the MOTD will be shown again, and the
error should be gone.
[Regression Potential]
* None for now. The file being called in WSL right now is only being
used by WSL confirmed by CPC
[Original Bug Report]
motd on demo of 20.04:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.19.84-microsoft-standard
x86_64)
....
26 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable
/usr/lib/ubuntu-release-upgrader/release-upgrade-motd: 31: cannot
create /var/lib/ubuntu-release-upgrader/release-upgrade-available:
Permission denied
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-upgrader/+bug/1873545/+subscriptions
More information about the foundations-bugs
mailing list