403 Forbidden You don't have permission to access this resource error

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, 18.0.2): 18.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.1): PHP 7.4.3 (cli) (built: May 5 2020 12:14:27)

The issue you are facing:

Installation going great, i manage to access the web interface. But i got this 403 Forbidden error if i quickly clik to others tab. Such as from Files -> quickly click to Contacts. But after i got this error, i just keep patient and wait for 2-3 minutes, click refresh, the tab come out successfully.

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

Steps to replicate it:

  1. Already try to point datadirecory to different location (under /var/www/nextcloud/data.
  2. Already try to change all chown, chmod. even 777, still no luck
  3. I install from Mr hansson VM package. Just detect that by default it have 2 disk. I thought because of the sistem need to access from another disc, it cause a late response but it seem that not a problem

The output of your Nextcloud log in Admin > Logging:

Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230


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

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx’,
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '10.23.140.16',
    2 => 'nextcloud',
    3 => 'nextcloud',
    4 => 'xxxxx.my',
    5 => ‘xxxx.my',
    6 => 'xxxxx.my',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'https://nextcloud/',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'ncadmin',
  'dbpassword' => 'Qtn*xxxxxq',
  'installed' => true,
  'instanceid' => 'ockq0c90bnp5',
  'upgrade.disable-web' => 'true',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => '2',
  'mail_smtpmode' => 'smtp',
  'remember_login_cookie_lifetime' => '1800',
  'log_rotate_size' => '10485760',
  'trashbin_retention_obligation' => 'auto, 180',
  'versions_retention_obligation' => 'auto, 365',
  'simpleSignUpLink.shown' => 'false',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => 'GxxxxxxxxxxxxxxxxxD4',
  ),
  'logtimezone' => 'Asia/Kuala_Lumpur',
  'htaccess.RewriteBase' => '/',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
);

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

From my /var/log/nextcloud.log, many times show this log

{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:39+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}
{"reqId":"Fe3nVhMgPM92khPulvQb","level":3,"time":"2020-05-08T14:03:40+08:00","remoteAddr":"10.23.142.34","user":"--","app":"PHP","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=a8750ce0-0","message":"Trying to access array offset on value of type null at /var/www/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0","version":"18.0.4.2"}

The error you see in the admin panel is normal and is fixed for next release.

I can’t see the rest of the logs could you verify your post ?

1 Like

Tq sir for the response, already update my issue…huhu.

Your nextcloud log file is incomplete could you provide it fully (without any personnal info like IP address)

ok, already upload again.

what is the effect with those error ya? Is it causing the 403 Forbidden ? But if i let it for 1-2 minutes and click refresh, i able to access the tab (like calendar tab, activity tab) but when switch too often n too fast, it appear the forbidden

Would like to close the issue. I already resolve it, i remove the server, install from scratch, success…yea…thanks all especially Mr Nemskiller

what a cool solution !!!
This is the NEW nextcloud ?