Nextcloud wont read user files

Nextcloud version (26.0.0.11)
Operating system and version (Ubuntu 22.04)
Apache or nginx version (Apache 2.4.52)
PHP version (8.2.4)

The issue you are facing:
All seems working normal BUT nextcloud just cant load data like pictures files etc

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

Steps to replicate it:

  1. I dont
  2. know
  3. Just changed directory and waited for a day

The output of your Nextcloud log in Admin > Logging:

OCP\Files\NotFoundException: /appdata_ocxbfu5ocptl/identityproof/user-Yaku	
2023-04-14T03:26:54+0500
Error	PHP	opendir(/media/yaku/PrimaryHDD/NextcloudDATA/appdata_ocxbfu5ocptl/identityproof): Failed to open directory: Permission denied at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#153	
2023-04-14T03:26:54+0500
Error	index	OCP\Files\NotPermittedException: Could not create folder	
2023-04-14T03:26:53+0500
Error	PHP	disk_free_space(): Permission denied at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#421	
2023-04-14T03:26:42+0500
Error	PHP	disk_free_space(): Permission denied at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#421	
2023-04-14T03:26:42+0500
Error	PHP	disk_free_space(): Permission denied at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#421	
2023-04-14T03:26:35+0500
Error	index	OCP\Files\NotPermittedException: Could not create folder	
2023-04-14T03:26:33+0500
Error	index	OCP\Files\NotPermittedException: Could not create folder	
2023-04-14T03:26:26+0500

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

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => '192.168.0.207',
  ),
  'datadirectory' => '/media/yaku/PrimaryHDD/NextcloudDATA',
  'dbtype' => 'mysql',
  'version' => '26.0.0.11',
  'overwrite.cli.url' => 'http://192.168.0.207/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:80',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'app_install_overwrite' =>
  array (
    0 => 'workflow_media_converter',
    1 => 'apporder',
    2 => 'breezedark',
    3 => 'hidesidebars',
    4 => 'duplicatefinder',
    5 => 'files_ebookreader',
    6 => 'extract',
    7 => 'printer',
    8 => 'files_3dmodelviewer',
    9 => 'keeporsweep',
    10 => 'facerecognition',
    11 => 'maps',
  ),
);

You are going to have to be much, much more specific…

Did you make sure that the user www-data owns all the files?

The files that www-data will need to own will be in your data directory. I can see from your config file it is /media/yaku/PrimaryHDD/NextcloudDATA.

Do you know how to look at and set the owner of files on Ubuntu?

P.S. Normally nextcloud will set the correct owner on the files but if you copied some files manually or restored them form a backup or something else outside of nextcloud then this might be an issue.

Sure

root@server:/media/yaku/PrimaryHDD/NextcloudDATA# ls -l
total 5676
drwxr-x--- 10 www-data www-data    4096 Apr 13 14:23 appdata_ocxbfu5ocptl
drwxr-x---  6 www-data www-data    4096 Apr 13 14:19 data
drwxr-x---  2 www-data www-data    4096 Apr 12 14:48 files_external
-rwxr-x---  1 www-data www-data       0 Apr 12 14:38 flow.log
drwxr-x---  4 www-data www-data    4096 Apr 13 07:55 guest
-rwxr-x---  1 www-data www-data       0 Apr 12 14:38 index.html
-rw-r-----  1 www-data www-data 5786356 Apr 14 00:09 nextcloud.log
drwxr-x---  6 www-data www-data    4096 Apr 13 14:18 Yaku
root@server:/media/yaku/PrimaryHDD# ls -l
total 178984
drwxr-x---  5 www-data www-data      4096 Apr 11 16:05 angel
drwxr-x--- 11 www-data www-data      4096 Feb 28 21:04 FoE
drwxr-x--- 11 www-data www-data      4096 Feb 28 21:04 FoE1
-rwxr-x---  1 www-data www-data 183245146 Mar 21 09:25 latest.zip
drwxr-x---  2 www-data www-data     16384 Apr 11 17:24 lost+found
drwxr-x---  7 www-data www-data      4096 Apr 13 22:43 NextcloudDATA

Did you resolve this issue? I have the exact same problem. NC 26.0.3 and PHP 8.2 wont play together. Login etc works, even calendar and carnet, but “Files” remains empty and clients dont sync. As soon as I switch to PHP 8.1 all works.

Same Problem here. Nextcloud wont read user files

files(Nextcloud wont read user files)NC 26.0.3 and PHP 8.2
OCP\Files\NotPermittedException: Could not create path