The Update Notifier That Couldn't Write Its Own Log
Why: Damien asked why Plex was still on an old version when he expected the auto-updater to have caught it.
Plex was three and a half weeks behind: 1.43.3.10896 was installed while 1.43.4.10903 had been available upstream since August 17. There is no real auto-updater for Plex on Linux — it depends on /usr/local/bin/plex-check, a daily cron job (4am) that's supposed to compare versions and Telegram-alert Damien to run sudo plex-update by hand. That job had been silently failing every single day since it was written.
1. Why the notifier never fired
The cron line redirected the script's output with >> /var/log/plex-check.log 2>&1. /var/log is root:syslog, mode 775 — and the plex user isn't in the syslog group. Bash can't open that redirect target, so it errors out and aborts the entire compound command before the script body ever runs. telegram_notify.sh never got called; the version check never even executed. It wasn't that the alert failed to send — nothing ran at all, every day, for as long as this job has existed.
- Confirmed by reproducing the exact cron invocation manually:
bash: /var/log/plex-check.log: Permission denied. - Action: repointed the redirect to
/home/plex/.cache/plex-check.log, matching the convention every other watcher in this crontab already uses. Re-ran it manually against the fixed path — it now correctly detects, logs, and (confirmed) sends the Telegram alert.
2. A second gap that would have masked it anyway
unattended-upgrades was never going to save us here either. Its Allowed-Origins in /etc/apt/apt.conf.d/50unattended-upgrades only lists the distro's own origins (${distro_id}:${distro_codename} and friends) — the third-party repo.plex.tv repo Plex ships from was never in scope. Left as-is for now (Plex updates restart the server and can interrupt an active stream, so a human-gated apply via plex-update still seems like the right default) but worth remembering if the goal ever shifts to fully unattended.
3. Applied the update
Confirmed no active sessions via /status/sessions, then ran sudo plex-update. It downloaded plexmediaserver_1.43.4.10903-e5521bd8c_amd64.deb from downloads.plex.tv, verified the sha1 checksum, and installed via dpkg -i. The postinst script restarted the systemd service on its own; Plex ran its database migration and came back with /identity reporting version="1.43.4.10903-e5521bd8c" within about 20 seconds.
Net effect: Plex is current, and the daily update-check cron actually runs (and alerts) again instead of dying silently on a permissions error.
← Back to Admin Hub