Files in "External Storage" not showing up in "All Files" for a user

Nextcloud version (eg, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 8.2.15

The issue you are facing:

I have multiple external storages (which are actually just Local Storage, NFS mounts. My user sees them fine, and more importantly, they show up for me under “All Files” in the files app. When I authorize my wife to see them, they do NOT show up in “All Files” (and thus cannot be seen on her iPhone in the app). On the web, if I log into her account, I have a separate entry in the sidebar of the Files app that says “External Storage” where she can see each of the file repositories and browse them just fine, so I know there is no permission issue. Ultimately, I can’t figure out why these repositories work as expected for me, but not her.

In the logs, I’m seeing file errors, for the default “README” file that comes in each user directory…which we deleted? It’s not there and I don’t see it at all, as expected, I don’t understand why it’s showing up in web logs?

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

Steps to replicate it:

  1. Log in as her to Nextcloud (web or iPhone)
  2. Browse to files app
  3. See no files in “All Files”

The output of your Nextcloud log in Admin > Logging:

For some reason this page lags my browser out, but it's just the same error below that the "README" file can't be read, which we know because it was deleted and shouldn't be referenced?

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 => 'hda.domain.tld',
    1 => 'domain.tld',
    2 => 'nextcloud.domain.tld',
    3 => 'sr66-nxt-01.subdomain.domain.tld',
  ),
  'trusted_proxies' => 
  array (
    0 => '10.2.2.10',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'defaultapp' => 'files',
  'version' => '28.0.2.5',
  'overwritehost' => 'nextcloud.domain.tld',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/',
  'overwrite.cli.url' => 'https://nextcloud.domain.tld',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'sr66-sql-02.subdomain.domain.tld:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'usr_nextcloud',
  'dbpassword' => '-------------',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'theme' => '',
  'localstorage.umask' => 2,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 2,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'sr66-nxt-01.subdomain.domain.tld',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'default_phone_region' => 'US',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'app_install_overwrite' => 
  array (
    0 => 'files_3d',
    1 => 'files_texteditor',
    2 => 'printer',
    3 => 'epubreader',
    4 => 'richdocumentscode',
    5 => 'breezedark',
    6 => 'apporder',
    7 => 'ldap_write_support',
  ),
  'trashbin_retention_obligation' => 'auto,15',
  'allow_local_remote_servers' => true,
  'mail_smtpsecure' => 'ssl',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'dbindex' => 0,
    'password' => '',
    'timeout' => 1.5,
  ),
  'enforce_theme' => '',
  'updater.release.channel' => 'stable',
);

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

Nothing in apache error log

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Many instances of the following:

{"reqId":"dUlS7coAaQZAp7HnWI0Z","level":3,"time":"2024-02-20T05:04:43+00:00","remoteAddr":"10.4.3.131","user":"e7101ae6-52d3-103b-8e53-0fc031bcb58e","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/e7101ae6-52d3-103b-8e53-0fc
031bcb58e/","message":"file_get_contents(/var/www/nextcloud/data/e7101ae6-52d3-103b-8e53-0fc031bcb58e/files/Templates/Readme.md): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#
327","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0","version":"28.0.2.5","data":{"app":"PHP"}}
{"reqId":"dUlS7coAaQZAp7HnWI0Z","level":3,"time":"2024-02-20T05:04:43+00:00","remoteAddr":"10.4.3.131","user":"e7101ae6-52d3-103b-8e53-0fc031bcb58e","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/e7101ae6-52d3-103b-8e53-
0fc031bcb58e/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0","version":"28.0.2.5","exception":{"Exception":"OCP\\Files\\Generic
FileException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/text/lib/DAV/WorkspacePlugin.php","line":119,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/d
av/lib/DAV/PropFind.php","line":95,"function":"OCA\\Text\\DAV\\{closure}","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/text/lib/DAV/WorkspacePlug
in.php","line":117,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"OCA\\Text\\DAV\\WorkspacePlugin","
type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"functio
n":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file"
:"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":
"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/va
r/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class"
:"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":370
,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":1
72,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/Node/File.php","Line":56,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\
GenericFileException"}}


Ultimately this was solved by recreating the Readme.md file and the templates folder, which was silly, there should be a way to purge that? We deleted it from the UI in the app, how can that corrupt her profile so bad we have to monkey around in the file system?