# Occ error after update 14

**URL:** <https://help.nextcloud.com/t/occ-error-after-update-14/39110>\
**Category:** ℹ️ Support\
**Tags:** update\_problems, nc14\
**Created:** [October 14, 2018, 10:28am UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110 "2018-10-14T10:28:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![neo76](https://help.nextcloud.com/letter_avatar/neo76/32/5_5575768a8748004e209b776fc1b2916d.png) [@neo76](https://help.nextcloud.com/u/neo76)\
**Post date:** [October 14, 2018, 10:28am UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/1 "2018-10-14T10:28:15Z")

</div>

Hy,  
in admin apper this:

The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

- Missing index “share\_with\_index” in table “oc\_share”.
- Missing index “parent\_index” in table “oc\_share”.
- Missing index “fs\_mtime” in table “oc\_filecache”.

Ok say run … noproblem but after ssh command:

```
sudo -u myuser php occ db:add-missing-indices
Content-type: text/html; charset=UTF-8

An unhandled exception has been thrown:
TypeError: Return value of OC\AppFramework\Http\Request::getScriptName() must be of the type string, null returned in /home/***/public_html/lib/private/AppFramework/Http/Request.php:796
Stack trace:
#0 /home/***/public_html/lib/base.php(154): OC\AppFramework\Http\Request->getScriptName()
#1 /home/***/public_html/lib/base.php(591): OC::initPaths()
#2 /home/***/public_html/lib/base.php(1068): OC::init()
#3 /home/***/public_html/console.php(46): require_once('/home/***/p...')
#4 /home/***/public_html/occ(10): require_once('/home/***/p...')

```

**_Solution?_**  
Thx!

---

<div class="post-metadata">

**Author:** ![neo76](https://help.nextcloud.com/letter_avatar/neo76/32/5_5575768a8748004e209b776fc1b2916d.png) [@neo76](https://help.nextcloud.com/u/neo76)\
**Post date:** [October 14, 2018, 11:46am UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/2 "2018-10-14T11:46:00Z")

</div>

Update\>

For my this solution work perfect:

> [@DB missing index on NC 14](https://help.nextcloud.com/t/db-missing-index-on-nc-14/37048):
>
> I’ve updated to NC14 and I need to run occ db:add-missing-index but I am on Synology NAS and don’t have the ability to run occ command How can I do ? How can I add those indexes with SQL request ? Index "share\_with\_index" missing on table "share" Index "parent\_index" missing on table "share" Index "fs\_mtime" missing on table "filecache" Thanks Regards, Delor3an

I not use tablename  
`" __nextcloud__"`

simple add directley in myadmin  
 ![](https://i.imgur.com/KhkkOM7.png)

```
ALTER TABLE oc_share ADD INDEX share_with_index (share_with) USING BTREE;
ALTER TABLE oc_share ADD INDEX parent_index (parent) USING BTREE;
i added this:
ALTER TABLE oc_filecache ADD INDEX fs_mtime (mtime) USING BTREE;

```

---

<div class="post-metadata">

**Author:** ![neo76](https://help.nextcloud.com/letter_avatar/neo76/32/5_5575768a8748004e209b776fc1b2916d.png) [@neo76](https://help.nextcloud.com/u/neo76)\
**Post date:** [October 14, 2018, 12:02pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/3 "2018-10-14T12:02:11Z")

</div>

the rest Warning and error resolve in cPanel WHM

So far, the first line was sloppy  
Add lines 2 and 3 to the apache setting

```
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS

Header always set Referrer-Policy "no-referrer-when-downgrade"
Header always set X-Permitted-Cross-Domain-Policies "none"

```

Edit apache config:  
 ![](https://i.imgur.com/ObRLosv.png)

Final result:  
 ![](https://i.imgur.com/X1rwNMQ.png)

---

<div class="post-metadata">

**Author:** ![neo76](https://help.nextcloud.com/letter_avatar/neo76/32/5_5575768a8748004e209b776fc1b2916d.png) [@neo76](https://help.nextcloud.com/u/neo76)\
**Post date:** [October 14, 2018, 12:07pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/4 "2018-10-14T12:07:12Z")

</div>

**_If anyone knows the solution to the occ command line error I would thank you! …_**

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [October 14, 2018, 2:50pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/5 "2018-10-14T14:50:10Z")

</div>

Hi,

Can you just try:

```
sudo -u myuser php /home/***/public_html/occ db:add-missing-indices

```

What PHP version are you using?  
Can you check your folder and file permissions again?

---

<div class="post-metadata">

**Author:** ![neo76](https://help.nextcloud.com/letter_avatar/neo76/32/5_5575768a8748004e209b776fc1b2916d.png) [@neo76](https://help.nextcloud.com/u/neo76)\
**Post date:** [October 14, 2018, 3:20pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/6 "2018-10-14T15:20:53Z")

</div>

It does not work and 7.1 php is used in the cpanel because it is not work with 7.2 … while it is allegedly compatible and if I switch to 72, the whole thing dies.  
And os centos latest v.

---

<div class="post-metadata">

**Author:** ![RufioHugo](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rufiohugo/32/11640_2.png) [@RufioHugo](https://help.nextcloud.com/u/RufioHugo)\
**Post date:** [November 12, 2018, 6:39pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/7 "2018-11-12T18:39:18Z")

</div>

Is the first question @all solved?  
If so - please do me a favour and list your steps!

If not … I’ve got the same problem!

> ./occ db:add-missing-indices  
> X-Powered-By: PHP/7.1.22  
> Content-type: text/html
> 
> An unhandled exception has been thrown:  
> TypeError: Return value of OC\AppFramework\Http\Request::getScriptName() must be of the type string, null returned in /mnt/web004/e2/90/5395790/htdocs/nextcloud/lib/private/AppFramework/Http/Request.php:796  
> Stack trace:  
> #0 /mnt/web004/e2/90/5395790/htdocs/nextcloud/lib/base.php(154): OC\AppFramework\Http\Request-\>getScriptName()  
> #1 /mnt/web004/e2/90/5395790/htdocs/nextcloud/lib/base.php(591): OC::initPaths()  
> #2 /mnt/web004/e2/90/5395790/htdocs/nextcloud/lib/base.php(1068): OC::init()  
> #3 /mnt/web004/e2/90/5395790/htdocs/nextcloud/console.php(46): require\_once(‘/mnt/web004/e2/…’)  
> #4 /mnt/web004/e2/90/5395790/htdocs/nextcloud/occ(10): require\_once(‘/mnt/web004/e2/…’)

Rufio

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 10, 2018, 8:19pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/8 "2018-12-10T20:19:07Z")

</div>

> [@Schmu](#):
>
> What PHP version are you using?

hey @schmu  
i ran into the same problems with my update.  
here are some details of my setup

### Steps to reproduce

did upgrade from nc 13.0.7. to 14.0.4. and ran into several problems—  
could solve some myself by disabling some apps manually (first and foremost files\_external\_gdrive (or such)

### Expected behaviour

should run smoothly

### Actual behaviour

it shows some errors…

## Server configuration detail

**Operating system:** Linux 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l

**Webserver:** Apache/2.4.25 (Raspbian) (fpm-fcgi)

**Database:** mysql 10.1.37

**PHP version:**

7.2.13-1+0~20181207100540.13+stretch~1.gbpf57305  
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, mysqlnd, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, ldap, exif, mysqli, pdo\_mysql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

**Nextcloud version:** 14.0.4 - 14.0.4.2

**Updated from an older Nextcloud/ownCloud or fresh install:** updated from 13.0.7.

**Where did you install Nextcloud from:** back then at ownyourbits

> **Signing status**
>
> Array  
> (  
> )

> **List of activated apps**
>
> ```auto
> Enabled:
> - accessibility: 1.0.1
> - cloud_federation_api: 0.0.1
> - dav: 1.6.0
> - federatedfilesharing: 1.4.0
> - federation: 1.4.0
> - files: 1.9.0
> - files_external: 1.5.0
> - files_pdfviewer: 1.3.2
> - files_rightclick: 0.8.4
> - files_sharing: 1.6.2
> - files_texteditor: 2.6.0
> - files_trackdownloads: 1.3.1
> - files_trashbin: 1.4.1
> - files_videoplayer: 1.3.0
> - firstrunwizard: 2.3.0
> - flowupload: 0.0.8
> - gallery: 18.1.0
> - groupfolders: 2.0.0
> - issuetemplate: 0.4.0
> - logreader: 2.0.0
> - lookup_server_connector: 1.2.0
> - mail: 0.11.0
> - nextcloud_announcements: 1.3.0
> - notifications: 2.2.1
> - oauth2: 1.2.1
> - password_policy: 1.4.0
> - passwords: 2018.12.0
> - phonetrack: 0.3.9
> - previewgenerator: 2.0.0
> - provisioning_api: 1.4.0
> - registration: 0.4.5
> - serverinfo: 1.4.0
> - sharebymail: 1.4.0
> - socialsharing_email: 1.0.4
> - socialsharing_facebook: 1.0.3
> - socialsharing_twitter: 1.0.3
> - support: 1.0.0
> - tasks: 0.9.8
> - theming: 1.5.0
> - twofactor_backupcodes: 1.3.1
> - updatenotification: 1.4.1
> - workflowengine: 1.4.0
> Disabled:
> - activity
> - admin_audit
> - admin_notifications
> - announcementcenter
> - apporder
> - audioplayer
> - auto_mail_accounts
> - bookmarks
> - bruteforcesettings
> - calendar
> - caniupdate
> - circles
> - cms_pico
> - comments
> - contacts
> - dashboard
> - data_request
> - drop_account
> - dropit
> - encryption
> - external
> - files_accesscontrol
> - files_downloadactivity
> - files_external_gdrive
> - files_snapshots
> - files_versions
> - impersonate
> - metadata
> - ownbackup
> - quota_warning
> - radio
> - rainloop
> - ransomware_protection
> - sharerenamer
> - spreed
> - survey_client
> - systemtags
> - user_external
> - user_ldap
> 
> ```

> **Configuration (config/config.php)**
>
> ```auto
> {
> "passwordsalt": " ***REMOVED SENSITIVE VALUE***",
> "secret": " ***REMOVED SENSITIVE VALUE***",
> "trusted_domains": {
> "0": "localhost",
> "1": "192.168.192.250",
> "2": "nextcloud.local",
> "4": "ya.ya.ya",
> "5": "abc.de",
> "7": "nextcloudpi",
> "8": "nextcloudpi.lan"
> },
> "datadirectory": " ***REMOVED SENSITIVE VALUE***",
> "overwrite.cli.url": "https:\/\/removed\/",
> "dbtype": "mysql",
> "version": "14.0.4.2",
> "dbname": " ***REMOVED SENSITIVE VALUE***",
> "dbhost": " ***REMOVED SENSITIVE VALUE***",
> "dbport": "",
> "dbtableprefix": "oc_",
> "mysql.utf8mb4": true,
> "dbuser": " ***REMOVED SENSITIVE VALUE***",
> "dbpassword": " ***REMOVED SENSITIVE VALUE***",
> "installed": true,
> "instanceid": " ***REMOVED SENSITIVE VALUE***",
> "mail_smtpmode": "smtp",
> "mail_smtpauthtype": "LOGIN",
> "mail_smtpsecure": "ssl",
> "mail_from_address": " ***REMOVED SENSITIVE VALUE***",
> "mail_domain": " ***REMOVED SENSITIVE VALUE***",
> "mail_smtpauth": 1,
> "mail_smtphost": " ***REMOVED SENSITIVE VALUE***",
> "mail_smtpport": "465",
> "mail_smtpname": " ***REMOVED SENSITIVE VALUE***",
> "mail_smtppassword": " ***REMOVED SENSITIVE VALUE***",
> "loglevel": 0,
> "maintenance": false,
> "theme": "",
> "updater.release.channel": "production",
> "memcache.local": "\\OC\\Memcache\\Redis",
> "memcache.locking": "\\OC\\Memcache\\Redis",
> "redis": {
> "host": " ***REMOVED SENSITIVE VALUE***",
> "port": 0,
> "timeout": 0,
> "password": " ***REMOVED SENSITIVE VALUE***"
> },
> "log_type": "file",
> "defaultapp": "apporder",
> "updater.secret": " ***REMOVED SENSITIVE VALUE***"
> }
> 
> ```

**Are you using external storage, if yes which one:** local/smb/sftp/…

**Are you using encryption:**

**Are you using an external user-backend, if yes which one:**

## Client configuration

**Browser:** Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

**Operating system:** Windows 7 and 10 pro (64)

> [@Schmu](#):
>
> Can you check your folder and file permissions again?

i didn’t play around with file permissions - but if you’d be so nice and give me the command i’d tell you it’s outcome 😉

looking forward and thanks in advance

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [December 10, 2018, 9:08pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/9 "2018-12-10T21:08:11Z")

</div>

Hi @JimmyKater

Can you post your error messages again? What’s written in the nextcloud log?

> [@JimmyKater](#):
>
> i didn’t play around with file permissions - but if you’d be so nice and give me the command i’d tell you it’s outcome

OK 🙂  
Change directory to your NC installation folder (probably /var/www/nextcloud). Then run:

```auto
ls -lR | grep -E "^dr|^-r" | grep -v "`ps -ef | grep apache | grep -v root | awk '{print $1}' | sort | uniq`"

```

Not a nice command, but I don’t know your web server user 😛

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 10, 2018, 9:29pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/10 "2018-12-10T21:29:23Z")

</div>

> [@Schmu](#):
>
> Can you post your error messages again?

1. 

```
The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

 Missing index “share_with_index” in table “oc_share”.
 Missing index “parent_index” in table “oc_share”.
 Missing index “fs_mtime” in table “oc_filecache”.

```

2.` The “Referrer-Policy” HTTP header is not set to “no-referrer”, “no-referrer-when-downgrade”, “strict-origin” or “strict-origin-when-cross-origin”. This can leak referer information.`

i guess this could be solved by this [thread](https://help.nextcloud.com/t/the-referrer-policy-http-header-is-not-set-to-no-referrer/36613) (haven’t tried it yet, though)

> [@Schmu](#):
>
> What’s written in the nextcloud log?

Error PHP Undefined index: parent at /var/www/nextcloud/lib/private/Files/Cache/Cache.php#168 2018-12-10T22:17:57+0100

> [@Schmu](#):
>
> (probably /var/www/nextcloud).

yes. user is www-data… too bad that your command showed no result on the screen ☹

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 10, 2018, 9:38pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/11 "2018-12-10T21:38:07Z")

</div>

> [@Schmu](#):
>
> Can you check your folder and file permissions again?

does this help?

> root@nextcloud:/var/log# ls -la /var/www/nextcloud  
> total 164  
> drwxr-xr-x 15 www-data www-data 4096 Dec 10 19:44 .  
> drwxr-xr-x 7 root root 4096 Dec 10 15:28 …  
> -rw-r–r-- 1 www-data www-data 2850 Dec 10 20:26 .htaccess  
> -rw-r–r-- 1 www-data www-data 163 Dec 10 19:42 .user.ini  
> drwxr-xr-x 33 www-data www-data 4096 Dec 10 19:42 3rdparty  
> -rw-r–r-- 1 www-data www-data 12063 Dec 10 19:42 AUTHORS  
> -rw-r–r-- 1 www-data www-data 34520 Dec 10 19:42 COPYING  
> drwxr-xr-x 82 www-data www-data 4096 Dec 10 21:59 apps  
> drwxr-xr-x 2 www-data www-data 4096 Dec 10 19:44 config  
> -rw-r–r-- 1 www-data www-data 3650 Dec 10 19:42 console.php  
> drwxr-xr-x 18 www-data www-data 4096 Dec 10 19:45 core  
> -rw-r–r-- 1 www-data www-data 4979 Dec 10 19:44 cron.php  
> drwxr-x— 6 www-data www-data 4096 Aug 7 2017 data  
> -rw-r–r-- 1 www-data www-data 179 Dec 10 19:42 index.html  
> -rw-r–r-- 1 www-data www-data 3171 Dec 10 19:45 index.php  
> drwxr-xr-x 6 www-data www-data 4096 Dec 10 19:42 lib  
> -rw-r–r-- 1 www-data www-data 283 Dec 10 19:44 occ  
> drwxr-xr-x 2 www-data www-data 4096 Dec 10 19:42 ocm-provider  
> drwxr-xr-x 2 www-data www-data 4096 Dec 10 19:44 ocs  
> drwxr-xr-x 2 www-data www-data 4096 Dec 10 19:44 ocs-provider  
> -rw-r–r-- 1 www-data www-data 2971 Dec 10 19:45 public.php  
> -rw-r–r-- 1 www-data www-data 5139 Dec 10 19:45 remote.php  
> drwxr-xr-x 4 www-data www-data 4096 Dec 10 19:42 resources  
> -rw-r–r-- 1 www-data www-data 26 Dec 10 19:42 robots.txt  
> drwxr-xr-x 12 www-data www-data 4096 Dec 10 19:42 settings  
> -rw-r–r-- 1 www-data www-data 2232 Dec 10 19:45 status.php  
> drwxr-xr-x 3 www-data www-data 4096 Dec 10 19:42 themes  
> drwxr-xr-x 2 www-data www-data 4096 Aug 6 2017 updater  
> -rw-r–r-- 1 www-data www-data 362 Dec 10 19:42 version.php

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [December 10, 2018, 9:45pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/12 "2018-12-10T21:45:01Z")

</div>

> [@JimmyKater](#):
>
> too bad that your command showed no result on the screen

Then your permission should be set correctly.

> [@JimmyKater](#):
>
> i guess this could be solved by this [thread](https://help.nextcloud.com/t/the-referrer-policy-http-header-is-not-set-to-no-referrer/36613) (haven’t tried it yet, though)

That’s probably not the right thread. In the earlier versions the header needed to be added manually, but with NC 14.0.4 the header was added already. Usually, the check fails, if the header is set twice.

Please check here if that’s the case and the header is really set twice:  
[https://securityheaders.io/](https://securityheaders.io/)

If it’s set twice, this might probably help:

> [@\[Solved\] 14.0.3-\>14.0.4 & "Referrer-Policy" HTTP header Warning appears Again](https://help.nextcloud.com/t/solved-14-0-3-14-0-4-referrer-policy-http-header-warning-appears-again/41781/2):
>
> I also had this issue. I had Header always set Referrer-Policy "no-referrer" in /etc/apache2/conf-available/security.conf. Replacing with Header set Referrer-Policy "no-referrer" and restarting Apache and the warning goes away. Now what does the “always” option do?

Or removing the header from one of the locations. I’m currently trying to find the many threads that were opened recently. If I find them, I’ll post them here.

For the DB part, run:  
`sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices`

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 10, 2018, 9:48pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/13 "2018-12-10T21:48:11Z")

</div>

> [@Schmu](#):
>
> sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices

it won’t run  
with the following errors

> root@nextcloud:/var/log# sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices  
> An unhandled exception has been thrown:  
> ArgumentCountError: Too few arguments to function OCA\GroupFolders\Command\ExpireGroupVersions::\_\_construct(), 0 passed in /var/www/nextcloud/lib/private/Console/Application.php on line 222 and exactly 1 expected in /var/www/nextcloud/apps/groupfolders/lib/Command/ExpireGroupVersions.php:34  
> Stack trace:  
> #0 /var/www/nextcloud/lib/private/Console/Application.php(222): OCA\GroupFolders\Command\ExpireGroupVersions-\>\_\_construct()  
> #1 /var/www/nextcloud/lib/private/Console/Application.php(134): OC\Console\Application-\>loadCommandsFromInfoXml(Array)  
> #2 /var/www/nextcloud/console.php(95): OC\Console\Application-\>loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))  
> #3 /var/www/nextcloud/occ(11): require\_once(‘/var/www/nextcl…’)

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [December 10, 2018, 9:49pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/14 "2018-12-10T21:49:48Z")

</div>

Here we go:  
the other solution is, to remove or comment the header setting from the apache config file (/etc/apache2/apache2.conf):

> [@The "Referrer-Policy" HTTP header is not set to "no-referrer"](https://help.nextcloud.com/t/the-referrer-policy-http-header-is-not-set-to-no-referrer/36613/43):
>
> So that I can remember for the future, here is what I did to correct this problem (I am running Ubuntu 16.04): In /var/www/html/nextcloud/.htacess, I commented out: Header set Referrer-Policy "no-referrer" In /etc/apache2/apache2.conf, I have the following: \<IfModule mod\_headers.c\> Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" Header always set Referrer-Policy "no referrer" Header always set Referrer-Policy "strict-origin" \</IfModule\> Th…

To remove it from the .htaccess now, doesn’t make any sense to me, because it will be added by nextcloud with every update. Removing `Header always set Referrer-Policy "no referrer"` from apache config should be more future-proof.

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [December 10, 2018, 9:51pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/15 "2018-12-10T21:51:24Z")

</div>

> [@JimmyKater](#):
>
> it won’t run  
> with the following errors

Did you update the app groupfolders to the latest version right before?  
When I wanted to run occ to find out the correct commands for the DB index I noticed that occ didn’t run on my server as well. For me this issue occured with the last groupfolders update.

I “solved” that issue by moving the “groupfolders” folder out of /var/www/nextcloud/apps/; i.e.  
`mv /var/www/nextcloud/apps/groupfolders ~/`

**Edit:** Issue with groupfolders confirmed:

> <https://github.com/nextcloud/groupfolders/issues/240>
>
> Log says
> \`Interface 'OCA\\Files\_Versions\\Versions\\IVersionBackend' not found at …/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php#37\`
> 
> I had to disable groupfolders manually to get NC going again.
> 
> NC Version: 14.0.4.2
> Apache/2.4.10 (Debian)
> PHP Version: 7.0.32
> MySQL Version: 5.5.62

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 10, 2018, 10:02pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/16 "2018-12-10T22:02:37Z")

</div>

> [@Schmu](#):
>
> I “solved” that issue by moving the “groupfolders” folder out of /var/www/nextcloud/apps/; i.e.  
> `mv /var/www/nextcloud/apps/groupfolders ~/`

at least now the add-command runs through.  
so that solved MY problem with the db as well. thanks.

how do i mv it back? or would a new installation of it be better?

i need to check the other error on like tomorrow. i’m sure there’s a solution as well.

thank you very much for your help!!! i really appreciate it

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [December 10, 2018, 10:06pm UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/17 "2018-12-10T22:06:29Z")

</div>

I don’t suggest moving version 2.0 back in. On github the users are reporting heavy server load and log file flooding.  
Best is probably to wait for the next version and install the new and fixed version from the app store. I’ll do that this way.

And yeah, the other message will probably disappear as soon as you comment out one content-policy-header setting.

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 11, 2018, 9:38am UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/18 "2018-12-11T09:38:17Z")

</div>

> [@Schmu](#):
>
> Removing `Header always set Referrer-Policy "no referrer"` from apache config should be more future-proof.

i commented that out like this:

```
#<IfModule mod_headers.c>
# Header always set Referrer-Policy "no-referrer"
#</IfModule>

```

but somehow it seems that it didn’t work out the way we expected it because the error didnt vanish

---

<div class="post-metadata">

**Author:** ![CFelix](https://help.nextcloud.com/letter_avatar/cfelix/32/5_5575768a8748004e209b776fc1b2916d.png) [@CFelix](https://help.nextcloud.com/u/CFelix)\
**Post date:** [December 11, 2018, 9:59am UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/19 "2018-12-11T09:59:10Z")

</div>

Hi Jimmy,

can you run your site through [securityheaders.com](https://securityheaders.com/) and see whether it says something along the lines in the “Warning box”

`There was a duplicate.....`

If there is, this is causing the message `Header always set Referrer-Policy "no referrer"` to appear in your admin panel.

I had the same issue and checked in the apache configs as well as in the nginx configs and the .htaccess. I agree with Schmu, I would leave it in the .htaccess since NC is always adding it there with each update you do.

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [December 11, 2018, 11:05am UTC](https://help.nextcloud.com/t/occ-error-after-update-14/39110/20 "2018-12-11T11:05:07Z")

</div>

thanks @CFelix for joining in here 🙂

i ran my site through the link you provided and it came up with the following warnings

> Warnings
> 
> | Content-Security-Policy | This policy contains ‘unsafe-eval’ which is dangerous in the script-src directive. |
> | --- | --- |
> | Referrer-Policy | There was a duplicate Referrer-Policy header. |

and this missing thing

> Missing Headers
> 
> Feature-Policy [Feature Policy](https://scotthelme.co.uk/a-new-security-header-feature-policy/) is a new header that allows a site to control which features and APIs can be used in the browser.

ummm. noob-question: where do i find the ngix.conf, usually?

[Next page](https://help.nextcloud.com/t/occ-error-after-update-14/39110.md?page=2)
