After updating today to 20.0.2 I get the Security & setup warnings in /settings/admin/overview
here are some warnings regarding your setup.
The database is missing some primary keys. Due to the fact that adding primary keys on big tables could take some time they were not added automatically. By running “occ db:add-missing-primary-keys” those missing primary keys could be added manually while the instance keeps running.
Missing primary key on table “oc_federated_reshares”.
Missing primary key on table “oc_systemtag_object_mapping”.
Missing primary key on table “oc_comments_read_markers”.
Missing primary key on table “oc_collres_resources”.
Missing primary key on table “oc_collres_accesscache”.
Missing primary key on table “oc_filecache_extended”.
I’m running Nextcloud on a Pine64 Rockpro together with OpenMediaVault 5 (NGINX / Debian based).
Nextcloud 20.0.1 was running without any warmings or security issues
This is normal behaviour: As stated in the message the command might take some time and therefore isn’t run automatically. Just run the command “occ db:add-missing-primary-keys” from the command line (occ is located in the Nextcloud root directory).
If you don’t have access to the command line, you could also try to install the app “occweb” and run it from within the app.
command ‘gcc’ from deb gcc
command ‘gcc’ from deb pentium-builder
command ‘ocp’ from deb opencubicplayer
command ‘kcc’ from deb kcc
command ‘hcc’ from deb lam4-dev
command ‘orcc’ from deb liborc-0.4-dev-bin
command ‘fcc’ from deb fcc
command ‘ncc’ from deb tinyos-tools
command ‘bcc’ from deb bcc
command ‘osc’ from deb osc
command ‘ocs’ from deb cscope
command ‘tcc’ from deb tcc
command ‘rcc’ from deb qtchooser
hemertje@NAS-rockpro64:/var/www/nextcloud$ sudo -u www-data php occ db:add-missing-primary-keys
Check primary keys.
Adding primary key to the federated_reshares table, this can take some time…
federated_reshares table updated successfully.
Adding primary key to the systemtag_object_mapping table, this can take some time…
systemtag_object_mapping table updated successfully.
Adding primary key to the comments_read_markers table, this can take some time…
comments_read_markers table updated successfully.
Adding primary key to the collres_resources table, this can take some time…
collres_resources table updated successfully.
Adding primary key to the collres_accesscache table, this can take some time…
collres_accesscache table updated successfully.
Adding primary key to the filecache_extended table, this can take some time…
filecache_extended table updated successfully.
hemertje@NAS-rockpro64:/var/www/nextcloud$
Thanks a lot, running the command “sudo -u www-data php occ db:add-missing-primary-keys” inside /var/www/nextcloud got the same output as posted and once refreshed the Overview page in Nextcloud got that sweet sweet All checks passed.
Good morning,
I have the same problem as this topic but I have a snap installation on my Ubuntu 20.04 server.
That is why a solution mentioned above does not work for me.
My installation path is:
tony@nxtc:/var/snap/nextcloud$ ll
total 20
drwxr-xr-x 5 root root 4096 Dec 2 05:05 ./
drwxr-xr-x 6 root root 4096 Nov 11 07:33 ../
drwxr-xr-x 8 root root 4096 Nov 12 00:00 24051/
drwxr-xr-x 8 root root 4096 Nov 12 00:00 24739/
drwxr-xr-x 3 root root 4096 Nov 11 07:34 common/
lrwxrwxrwx 1 root root 5 Dec 2 05:05 current -> 24739/
tony@nxtc:/var/snap/nextcloud$
Can you somebody help me what commands and where be needed to run?
Because when I tried
tony@nxtc:/var/snap/nextcloud$ sudo -u www-data php occ db:add-missing-primary-keys
sudo: php: command not found
good evening, I have a problem when I type this order sudo -u www-data php occ db: add-missing-primary-keys this shows me Segmentation fault (core dumped) if you can help me.