After upgrade 13 → 14.0.0.19 (forbidden 403, apps/files/)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 12.0.0.19
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04.1
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1):7.2.7

The issue you are facing: After upgrade 13 → 14.0.0.19 (forbidden 403, apps/files/)

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging: I can’t login

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

The output of your Apache/nginx/system log in /var/log/____:

Apache error.log

Cannot serve directory /var/www/nextcloud/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive, referer: https://xxxxxx.xxx/index.php/login


Apache access.log

IP-adresss - - [16/Sep/2018:06:17:28 +0200] "GET /apps/files/ HTTP/1.1" 403 4320 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"


Apache nextcloud.conf

<FilesMatch “.(cgi|shtml|phtml|php)$”>
SSLOptions +StdEnvVars

Alias /nextcloud “/var/www/nextcloud/”
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All

Dav off

SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud


.htaccess

IfModule mod_dir.c
DirectoryIndex index.php index.html
/IfModule


#!/bin/bash
ncpath=’/var/www/nextcloud’
htuser=‘www-data’
htgroup=‘www-data’
rootuser=‘root’

#printf “Creating possible missing Directories\n”
#mkdir -p $ncpath/data
#mkdir -p $ncpath/assets
#mkdir -p $ncpath/updater

printf “chmod Files and Directories\n”
find ${ncpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ncpath}/ -type d -print0 | xargs -0 chmod 0750

printf “chown Directories\n”
chown -R ${rootuser}:${htgroup} ${ncpath}
chown -R ${htuser}:${htgroup} ${ncpath}/apps/
chown -R ${htuser}:${htgroup} ${ncpath}/core/
chown -R ${htuser}:${htgroup} ${ncpath}/config/
chown -R ${htuser}:${htgroup} ${ncpath}/data/
chown -R ${htuser}:${htgroup} ${ncpath}/themes/
chown -R ${htuser}:${htgroup} ${ncpath}/updater/

chmod +x ${ncpath}/occ

printf “chmod/chown .htaccess\n”
if [ -f ${ncpath}/.htaccess ]
then
chmod 0644 ${ncpath}/.htaccess
chown ${rootuser}:${htgroup} ${ncpath}/.htaccess
fi
if [ -f ${ncpath}/data/.htaccess ]
then
chmod 0644 ${ncpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ncpath}/data/.htaccess
fi

I’m running Nextcloud 14.0.3 and have the same error that keeps appearing in my apache error.log
Nextcloud seems to be running fine though.

/var/log/apache2/error.log:[Fri Nov 16 22:16:16.143429 2018] [autoindex:error] [pid 23912] [client 192.xx.xx.xx:58041] AH01276: Cannot serve directory /var/www/nextcloud/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive