Nextcloud version: 26.0.3
Operating system and version: AlmaLinux release 8.8 (Sapphire Caracal)
Apache version: Apache/2.4.37 (AlmaLinux)
PHP version: 8.1.20
I noticed that removing deleted ldap users with occ user:delete does not remove their data folder.
I recently updated to 26.0.3 but it could be a problem for a while, I only use occ from time to time.
Here is the error I am facing:
sudo -u apache php occ user:delete “FF6174A3-2E12-410C-8FDA-4572B598A02F”
In UserDeletedFilesCleanupListener.php line 58:
User has no home storage
user:delete
The folder exists, but is empty (the user likely never logged in):
drwxr-xr-x. 2 apache apache 6 Jun 26 17:53 FF6174A3-2E12-410C-8FDA-4572B598A02F
Is this the first time you’ve seen this error? Yes
Steps to replicate it:
- sudo -u apache php occ ldap:show-remnants
- sudo -u apache php occ user:delete “IDofuser”
It’s repeatable with every remnant LDAP user.
The output of your Nextcloud log in Admin > Logging:
OC\User\NoUserException: FF6174A3-2E12-410C-8FDA-4572B598A02F is not a valid user anymore
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
‘instanceid’ => ‘xyz’,
‘passwordsalt’ => ‘xyz’,
‘secret’ => ‘xyz’,
‘trusted_domains’ =>
array (
0 => ‘xyz’,
1 => ‘xyz’,
),
‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘26.0.3.2’,
‘overwrite.cli.url’ => ‘https://xyz’,
‘htaccess.RewriteBase’ => ‘/’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘nextcloud’,
‘dbpassword’ => ‘xyz’,
‘installed’ => true,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtphost’ => ‘xyz’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_smtpport’ => ‘25’,
‘mail_from_address’ => ‘xyz’,
‘mail_domain’ => ‘xyz’,
‘lost_password_link’ => ‘xyz’,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/run/redis/redis-server.sock’,
‘port’ => 0,
‘timeout’ => 1.5,
),
‘ldapIgnoreNamingRules’ => false,
‘ldapProviderFactory’ => ‘OCA\User_LDAP\LDAPProviderFactory’,
‘default_language’ => ‘de’,
‘default_locale’ => ‘de_DE’,
‘default_phone_region’ => ‘DE’,
‘enable_previews’ => ‘false’,
‘ldapUserCleanupInterval’ => ‘240’,
‘maintenance’ => false,
‘theme’ => ‘’,
‘loglevel’ => 2,
‘updater.release.channel’ => ‘stable’,
‘skeletondirectory’ => ‘/var/www/html/emptyskeleton/’,
‘twofactor_enforced’ => ‘true’,
‘twofactor_enforced_groups’ =>
array (
),
‘twofactor_enforced_excluded_groups’ =>
array (
0 => ‘local’,
),
‘updater.secret’ => ‘xyz’,
);
The output of your Apache/nginx/system log in /var/log/____
:
nothing in the error log
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors.
{“file”:“/var/www/html/nextcloud/occ”,“line”:11,“args”:[“/var/www/html/nextcloud/console.php”],“function”:“require_once”}],“File”:“/var/www/html/nextcloud/apps/user_ldap/lib/User_LDAP.php”,“Line”:455,“message”:“FF6174A3-2E12-410C-8FDA-4572B598A02F is not a valid user anymore”,“exception”:{},“CustomMessage”:“FF6174A3-2E12-410C-8FDA-4572B598A02F is not a valid user anymore”}}
I can add the full line if necessary
It seems to remove the user after a while, so user:delete will then show “User does not exist”, but still the data folder exists.
Regards,
Pascal