CentOS update breaks Nextcloud authentication

Setup

CentOS 7.6.1810
PostgreSQL 11.2
PHP 7.3.4
nginx/1.12.2
Nextcloud 16.0.4

After performing CentOS update using “yum update -y” Nextcloud user logins stop working through the web interface and password reset cannot be completed as Nextcloud reports that it cannot send emails. Password reset worked fine prior the update.

I easily go back to working state using VM snapshot but don’t want to leave the OS unpatched.

Can you point me in the right direction to troubleshoot this issue?

Thanks.

selinux?

(it’s only my first though because i’m just trying got this right in my playbboks…)

Thanks for the tip but selinux is disabled on this machine.

anything in the logs? (nextcloud.log, nginx, php-fpm, …)

Please could you also have a look into your /var/log/yum.log to see what has been updated? Maybe that gives a hint as well what is causing your issue.

Apart from that I agree with @Reiner_Nippes - It’s always practical to look into the log files of each piece of software you are using, as these might give you error messages, which in return could point you to the solution of the problem.

Unfortunately there are no error messages or entries in nextcloud, nginx and php-fpm log files that point to the cause of the issue. I wonder if it has to do with postgresql update.

Below is the list of packages that get installed as part of yum update. This is text copy from SSH session after “yum update” is issued but before confirmation with “y” (not from yum.log).

Package Arch Version Repository Size

Installing:
kernel x86_64 3.10.0-957.27.2.el7 updates 48 M
Updating:
ImageMagick6-libs x86_64 6.9.10.62-1.el7.remi remi-safe 2.4 M
LibRaw x86_64 0.19.2-0.el7.remi remi-safe 308 k
bind-libs-lite x86_64 32:9.9.4-74.el7_6.2 updates 742 k
bind-license noarch 32:9.9.4-74.el7_6.2 updates 87 k
cpp x86_64 4.8.5-36.el7_6.2 updates 5.9 M
curl x86_64 7.29.0-51.el7_6.3 updates 269 k
device-mapper x86_64 7:1.02.149-10.el7_6.8 updates 293 k
device-mapper-event x86_64 7:1.02.149-10.el7_6.8 updates 189 k
device-mapper-event-libs x86_64 7:1.02.149-10.el7_6.8 updates 188 k
device-mapper-libs x86_64 7:1.02.149-10.el7_6.8 updates 321 k
gcc x86_64 4.8.5-36.el7_6.2 updates 16 M
gcc-c++ x86_64 4.8.5-36.el7_6.2 updates 7.2 M
ghostscript x86_64 9.07-31.el7_6.11 updates 4.3 M
glib2 x86_64 2.56.1-4.el7_6 updates 2.5 M
glibc x86_64 2.17-260.el7_6.6 updates 3.7 M
glibc-common x86_64 2.17-260.el7_6.6 updates 12 M
glibc-devel x86_64 2.17-260.el7_6.6 updates 1.1 M
glibc-headers x86_64 2.17-260.el7_6.6 updates 684 k
iproute x86_64 4.11.0-14.el7_6.2 updates 764 k
kernel-headers x86_64 3.10.0-957.27.2.el7 updates 8.0 M
kernel-tools x86_64 3.10.0-957.27.2.el7 updates 7.2 M
kernel-tools-libs x86_64 3.10.0-957.27.2.el7 updates 7.1 M
kexec-tools x86_64 2.0.15-21.el7_6.4 updates 344 k
libcurl x86_64 7.29.0-51.el7_6.3 updates 222 k
libgcc x86_64 4.8.5-36.el7_6.2 updates 102 k
libgomp x86_64 4.8.5-36.el7_6.2 updates 158 k
libssh2 x86_64 1.4.3-12.el7_6.3 updates 135 k
libstdc++ x86_64 4.8.5-36.el7_6.2 updates 305 k
libstdc+±devel x86_64 4.8.5-36.el7_6.2 updates 1.5 M
libteam x86_64 1.27-6.el7_6.1 updates 48 k
libuv x86_64 1:1.30.1-1.el7 epel 138 k
lvm2 x86_64 7:2.02.180-10.el7_6.8 updates 1.3 M
lvm2-libs x86_64 7:2.02.180-10.el7_6.8 updates 1.1 M
microcode_ctl x86_64 2:2.1-47.5.el7_6 updates 2.0 M
nginx x86_64 1:1.12.2-3.el7 epel 531 k
nginx-all-modules noarch 1:1.12.2-3.el7 epel 16 k
nginx-filesystem noarch 1:1.12.2-3.el7 epel 17 k
nginx-mod-http-geoip x86_64 1:1.12.2-3.el7 epel 23 k
nginx-mod-http-image-filter x86_64 1:1.12.2-3.el7 epel 27 k
nginx-mod-http-perl x86_64 1:1.12.2-3.el7 epel 36 k
nginx-mod-http-xslt-filter x86_64 1:1.12.2-3.el7 epel 26 k
nginx-mod-mail x86_64 1:1.12.2-3.el7 epel 54 k
nginx-mod-stream x86_64 1:1.12.2-3.el7 epel 76 k
nodejs x86_64 1:6.17.1-1.el7 epel 4.7 M
npm x86_64 1:3.10.10-1.6.17.1.1.el7 epel 2.5 M
pango x86_64 1.42.4-2.el7_6 updates 280 k
php-cli x86_64 7.3.9-1.el7.remi remi-php73 4.9 M
php-common x86_64 7.3.9-1.el7.remi remi-php73 1.1 M
php-devel x86_64 7.3.9-1.el7.remi remi-php73 1.2 M
php-fpm x86_64 7.3.9-1.el7.remi remi-php73 1.7 M
php-gd x86_64 7.3.9-1.el7.remi remi-php73 80 k
php-intl x86_64 7.3.9-1.el7.remi remi-php73 225 k
php-json x86_64 7.3.9-1.el7.remi remi-php73 65 k
php-mbstring x86_64 7.3.9-1.el7.remi remi-php73 510 k
php-mysqlnd x86_64 7.3.9-1.el7.remi remi-php73 233 k
php-opcache x86_64 7.3.9-1.el7.remi remi-php73 308 k
php-pdo x86_64 7.3.9-1.el7.remi remi-php73 127 k
php-pear noarch 1:1.10.9-3.el7.remi remi-php73 359 k
php-pecl-apcu x86_64 5.1.17-2.el7.remi.7.3 remi-php73 74 k
php-pecl-apcu-devel x86_64 5.1.17-2.el7.remi.7.3 remi-php73 46 k
php-pecl-igbinary x86_64 3.0.1-2.el7.remi.7.3 remi-php73 111 k
php-pecl-imagick x86_64 3.4.4-2.el7.remi.7.3 remi-php73 157 k
php-pecl-redis4 x86_64 4.3.0-2.el7.remi.7.3 remi-php73 222 k
php-pgsql x86_64 7.3.9-1.el7.remi remi-php73 126 k
php-process x86_64 7.3.9-1.el7.remi remi-php73 82 k
php-xml x86_64 7.3.9-1.el7.remi remi-php73 207 k
postgresql11 x86_64 11.5-1PGDG.rhel7 pgdg11 1.6 M
postgresql11-libs x86_64 11.5-1PGDG.rhel7 pgdg11 361 k
postgresql11-server x86_64 11.5-1PGDG.rhel7 pgdg11 4.7 M
python x86_64 2.7.5-80.el7_6 updates 95 k
python-libs x86_64 2.7.5-80.el7_6 updates 5.6 M
python-perf x86_64 3.10.0-957.27.2.el7 updates 7.1 M
rh-python36-python x86_64 3.6.3-7.el7 centos-sclo-rh 55 k
rh-python36-python-devel x86_64 3.6.3-7.el7 centos-sclo-rh 841 k
rh-python36-python-libs x86_64 3.6.3-7.el7 centos-sclo-rh 7.5 M
rsync x86_64 3.1.2-6.el7_6.1 updates 404 k
selinux-policy noarch 3.13.1-229.el7_6.15 updates 484 k
selinux-policy-targeted noarch 3.13.1-229.el7_6.15 updates 6.9 M
systemd x86_64 219-62.el7_6.9 updates 5.1 M
systemd-libs x86_64 219-62.el7_6.9 updates 408 k
systemd-sysv x86_64 219-62.el7_6.9 updates 84 k
teamd x86_64 1.27-6.el7_6.1 updates 113 k
tuned noarch 2.10.0-6.el7_6.4 updates 254 k
tzdata noarch 2019b-1.el7 updates 491 k
vim-minimal x86_64 2:7.4.160-6.el7_6 updates 437 k
wget x86_64 1.14-18.el7_6.1 updates 547 k
zabbix-agent x86_64 4.2.6-1.el7 zabbix 415 k
zabbix-release noarch 4.2-2.el7 zabbix 14 k
Installing for dependencies:
oniguruma5 x86_64 6.9.3-1.el7.remi remi-safe 193 k

Transaction Summary

Install 1 Package (+1 Dependent package)
Upgrade 88 Packages

Total download size: 200 M

I came to realization that php updates are causing the issue. List of packages below. Also to mention that Opcache and Redis are used as part of server optimization. I wonder if anyone has any ideas on what the solution might be now that I narrowed the issue down?

yum install php-cli php-common php-devel php-fpm php-gd php-intl php-json php-mbstring php-mysqlnd php-opcache php-pdo php-pear php-pecl-apcu php-pecl-apcu-devel php-pecl-igbinary php-pecl-imagick php-pecl-redis4 php-pgsql php-process php-xml

ISSUE:
php update changed ownership of /var/lib/php/session directory

SOLUTION:
chown -R nginx:nginx /var/lib/php/session

2 Likes