I get a NoUserException error. Please help

I get an error. I would like to know if anyone knows how to deal with this
Machine translation is used. If there is any unnatural English, I am sorry.

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.4.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Shared hosting environment
  • Web server and version (e.g, Apache 2.4.25):
    • LiteSpeed
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • N/A
  • PHP version (e.g, 8.3):
    • PHP 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After initial installation was working fine, but errors appeared later
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Manual installation on shared hosting
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • yes
    • But there was no error.

Summary of the issue you are facing:

I’m encountering errors in my Nextcloud logs related to the “admin” user not being recognized by the backend. These errors occur during background tasks, specifically when running the UpdateSingleMetadata job. The admin user exists and was working before. The server is using Redis for caching, and these errors weren’t present immediately after installation.

Steps to replicate it (hint: details matter!):

I am really sorry, but I can not find it. ,

Log entries

no app in context

NoUserException
Backends provided no user object
issue while running UpdateSingleMetadata
files

NoUserException
Backends provided no user object
Backends provided no user object for admin
{"reqId":"2y0OpoEPAB07nDiry1ex","level":3,"time":"2025-05-10T12:50:33+00:00","remoteAddr":"2404:7a81:5a80:4700:358f:d4ed:8772:6b1f","user":false,"app":"files","method":"GET","url":"/cron.php","message":"Backends provided no user object for admin","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","version":"31.0.4.1","exception":{"Exception":"OC\\User\\NoUserException","Message":"Backends provided no user object","Code":0,"Trace":[{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/Files/Node/LazyFolder.php","line":64,"function":"call_user_func_array"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/Files/Node/LazyRoot.php","line":38,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/FilesMetadata/Job/UpdateSingleMetadata.php","line":41,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OC\\FilesMetadata\\Job\\UpdateSingleMetadata","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/public/BackgroundJob/QueuedJob.php","line":43,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/public/BackgroundJob/QueuedJob.php","line":29,"function":"start","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/cron.php","line":236,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/Files/Node/Root.php","Line":340,"message":"Backends provided no user object for admin","exception":{},"CustomMessage":"Backends provided no user object for admin"}}
{"reqId":"2y0OpoEPAB07nDiry1ex","level":2,"time":"2025-05-10T12:50:33+00:00","remoteAddr":"2404:7a81:5a80:4700:358f:d4ed:8772:6b1f","user":false,"app":"no app in context","method":"GET","url":"/cron.php","message":"issue while running UpdateSingleMetadata","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","version":"31.0.4.1","exception":{"Exception":"OC\\User\\NoUserException","Message":"Backends provided no user object","Code":0,"Trace":[{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/Files/Node/LazyFolder.php","line":64,"function":"call_user_func_array"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/Files/Node/LazyRoot.php","line":38,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/FilesMetadata/Job/UpdateSingleMetadata.php","line":41,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/public/BackgroundJob/Job.php","line":61,"function":"run","class":"OC\\FilesMetadata\\Job\\UpdateSingleMetadata","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/public/BackgroundJob/QueuedJob.php","line":43,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/public/BackgroundJob/QueuedJob.php","line":29,"function":"start","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"},{"file":"/home/wasabi/domains/cloud.wasabii.net/public_html/cron.php","line":236,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/home/wasabi/domains/cloud.wasabii.net/public_html/lib/private/Files/Node/Root.php","Line":340,"message":"issue while running UpdateSingleMetadata","exception":{},"userId":"admin","fileId":27,"CustomMessage":"issue while running UpdateSingleMetadata"}}

Web server / Reverse Proxy

2025-05-10 22:34:50.725701 [INFO] [265800] [T0] [127.0.0.1:35526#APVH_www.domain.net] [ACL] Access to context [/data/] is denied!
2025-05-10 22:34:50.872242 [INFO] [265799] [T0] [127.0.0.1:35556#APVH_www.domain.net] [ACL] Access to context [/data/] is denied!

The /data/ folder has permissions of 777. And WAF is not responding.

Apps

[0] => Core
[1] => date
[2] => libxml
[3] => openssl
[4] => pcre
[5] => sqlite3
[6] => zlib
[7] => bz2
[8] => calendar
[9] => ctype
[10] => curl
[11] => hash
[12] => filter
[13] => ftp
[14] => gettext
[15] => json
[16] => iconv
[17] => SPL
[18] => pcntl
[19] => random
[20] => readline
[21] => Reflection
[22] => session
[23] => standard
[24] => mbstring
[25] => shmop
[26] => SimpleXML
[27] => tokenizer
[28] => xml
[29] => litespeed
[30] => apcu
[31] => bcmath
[32] => dom
[33] => fileinfo
[34] => gd
[35] => igbinary
[36] => imagick
[37] => intl
[38] => exif
[39] => memcache
[40] => memcached
[41] => msgpack
[42] => PDO
[43] => mysqlnd
[44] => mysqli
[45] => pdo_mysql
[46] => pdo_sqlite
[47] => Phar
[48] => posix
[49] => psr
[50] => redis
[51] => soap
[52] => sockets
[53] => sodium
[54] => sysvsem
[55] => sysvshm
[56] => xmlreader
[57] => xmlrpc
[58] => xmlwriter
[59] => xsl
[60] => zip
[61] => Zend OPcache

Nextcloud


<?php
$CONFIG = array (
  'trusted_domains' => 
  array (
    0 => 'XXXnet',
  ),
  'datadirectory' => '/home/XXX/domains/.XXXnet/public_html/data',
  'dbtype' => 'mysql',
  'version' => '31.0.4.1',
  'overwrite.cli.url' => 'https://XXX.net',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'installed' => true,
  'default_phone_region' => 'JP',
  'default_timezone' => 'Asia/Tokyo',
  'maintenance_window_start' => 1,
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.distributed' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => array(
     'host' => '/home/XXXi/.local/bin/redis.sock',
     'port' => 0,
     'timeout' => 0.0,
      ),
);

Yours faithfully,

Hello @sssaaallliiiiwwww,

welcome to the Nextcloud community! :handshake:

the exception comes from “function”: “getUserFolder”, which is related to user folder.. together with the other message

it makes me think you experience some storage issues..

It also seems strange as you are talking about /data but you config shows

this is not required - you webserver user must be granted 640 for files and 750 for directories - see topics about file_permission

2 Likes

Thank you so much.

glad to hear you solved the problem :fireworks:
would be great you share some words about the problem and solution so others can learn.