Occ error after update 14

That depends if you have nginx installed and running.

To check whether nginx is installed:
nginx -v

And if it’s installed, see if it’s running:
ps aux | grep nginx

If both are true, you can find the config at /etc/nginx

If you are not running nginx, did you reload/restart Apache, after you have done the changes to your config?

1 Like

darn that did the trick! thanks :blush:

but the warning

Content-Security-Policy This policy contains 'unsafe-eval' which is dangerous in the script-src directive.

remains. as well as missing headers about feature policy

Ah I remember this one as well but couldn’t find a proper solution for it as of now. As far as I understand, NC is setting this SecurityHeader automatically via a PHP file but for some odd reason, it doesn’t work on all of the servers I tried it on.

I keep looking at this and will get back as soon as I found something

1 Like

“unsafe-eval” was necessary for NC to work at all. With NC15 developers were finally able (after long time of trying/ changing code) to remove that header. Still a few apps have to be changed to continue working without this header setting.
Nonetheless, don’t worry about it, for the time you still use <=NC14.0.4.

Developers already reduced the risk of that header by creating a nounce (probably not the correct terminology).

The feature policy header was also introduced in NC15 afaik. This is a very new header anyway. Just wait for NC15, it’s totally fine.

2 Likes

@Schmu @CFelix :heart: :heart: :heart: :heavy_heart_exclamation:

Hey @Schmu

I found this as well somewhere on here but thought there must be more to it as I only have it on some servers but not on all.

But that’s some good info right there, looking forward to NC15

Hi guys, I just wanted to update you, that NC15 indeed removed unsafe-eval from the CSP. I just checked that on my server.
For “Feature-Policy” on the other hand I cannot make a reliable statement. I “fixed” that for me before and don’t want to remove that for now. Maybe you can perform the header scan again, when on NC15 and report back, if the test tells that Feature-Policy is set.

For CSS it is still unsafe-inline by the way. I think this is still in for backward compatibility of apps which haven’t been fully updated. Will be fixed soon I guess.

1 Like

On upgrade to 16.0.1 get the same error… try to move outside (remove) groupfolders with same error…

Índice perdido "twofactor_providers_uid" en la tabla "oc_twofactor_providers".
Índice perdido "version" en la tabla "oc_whats_new".
Índice perdido "cards_abid" en la tabla "oc_cards".
Índice perdido "cards_prop_abid" en la tabla "oc_cards_properties".

any solution? it still happen form 14 version without solution ?
thanks in advance

hello,

DO A DB BACKUP BEFORE ANY MODIFICATIONS !!!
try occ command:
occ db:add-missing-indices

I had this problem too and it was because my php version is different than the default version. It’s explained here: https://docs.nextcloud.com/server/11/admin_manual/configuration_server/occ_command.html

If your HTTP server is configured to use a different PHP version than the default (/usr/bin/php), occ should be run with the same version. For example, in CentOS 6.5 with SCL-PHP56 installed, the command looks like this:

sudo -u apache /opt/rh/php56/root/usr/bin/php /var/www/html/nextcloud/occ