Open_basedir restriction in effect on non-existant file

Nextcloud version (eg, 20.0.5): 28.0.4
Operating system and version (eg, Ubuntu 20.04): Arch Linux Rolling (linux-hardened 6.8.9)
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.26.0
PHP version (eg, 7.4): 8.2.18

The issue you are facing: open_basedir restriction in effect on non-existant file
I tried adding the path it wants to open_basedir in the php fpm nextcloud conf file, but that did not work!

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

The output of your Nextcloud log in Admin > Logging:

{
  "reqId": "RHHABQU8ly24D9JQHOUU",
  "level": 3,
  "time": "2024-05-04T13:12:13+00:00",
  "remoteAddr": "<redacted>",
  "user": "passihd",
  "app": "PHP",
  "method": "GET",
  "url": "/settings/admin/logging",
  "message": "is_file(): open_basedir restriction in effect. File(/usr/share/webapps/nextcloudapps//core/l10n/en.js) is not within the allowed path(s): (/var/lib/nextcloud:/tmp:/usr/share/webapps/nextcloud:/etc/webapps/nextcloud:/dev/urandom:/usr/lib/php-legacy/modules:/var/log/nextcloud:/proc/meminfo:/usr/share/webapps/nextcloudapps) at /usr/share/webapps/nextcloud/lib/private/Template/ResourceLocator.php#100",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0",
  "version": "28.0.4.1",
  "data": {
    "app": "PHP"
  },
  "id": "6636342e58dda"
}

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

<?php
$CONFIG = array (
  'datadirectory' => '/var/lib/nextcloud/data',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'default_phone_region' => 'DE',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    2 => '<redacted>',
  ),
  'overwrite.cli.url' => 'https://<redacted>/',
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/share/webapps/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/lib/nextcloud/apps',
      'url' => '/wapps',
      'writable' => true,
    ),
  ),
  'passwordsalt' => '<redacted>',
  'secret' => '<redacted>',
  'dbtype' => 'mysql',
  'version' => '28.0.4.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '3306',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<redacted>',
  'installed' => true,
  'instanceid' => '<redacted>',
  'maintenance' => false,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '<redacted>',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => '<redacted',
  'mail_smtpport' => '587',
  'mail_smtpname' => '<redacted>',
  'mail_smtppassword' => '<redacted>',
  'app_install_overwrite' => 
  array (
    0 => 'hsts',
    1 => 'hibp',
    2 => 'files_rightclick',
    3 => 'integration_twitter',
    4 => 'breezedark',
  ),
  'loglevel' => 2,
  'maintenance_window_start' => 1,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
  ),
);

Proably this issue:

The fix should be in release 28.0.5 which was already released last week.

that fixed it, ty

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.