"Error creating the share: Please specify a valid user" when sharing with a specific email address

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5):
Operating system and version (eg, Ubuntu 20.04): Debian 9.13
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.4): 7.4

The issue you are facing: When I try to share a folder with “example@domain.com” I get the error mentionned in the post title, but any other address is working.

I’ve found the address in these tables :







I could simple delete the rows where the email is present but idk the side effect of this.
I also do not understand why the address is in “oc_accounts” because there’s no account with this email address.

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

Steps to replicate it:


The output of your Nextcloud log in Admin > Logging: Sadly there’s no log at all of this error


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

$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => ',
  'installed' => true,
  'trusted_domains' => 
  array (
    0 => 'mycloud.mydomain.net',
  'overwrite.cli.url' => 'https://mycloud.mydomain.net',
  'datadirectory' => '/data/webs/cloud/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'cloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'mysql.utf8mb4' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'mydomain.net',
  'mail_smtphost' => 'smtp.mydomain.net',
  'mail_smtpport' => '25',
  'default_language' => 'fr',
  'default_locale' => 'fr_FR',
  'theme' => '',
  'loglevel' => '0',
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'logfilemode' => 416,
  'logdateformat' => 'F d, Y H:i:s',
  'trashbin_retention_obligation' => '10, 90',
  'skeletondirectory' => '',

The output of your Apache/nginx/system log in /var/log/____: No log for this error in that file


So I seems that the tables where the email is present are used with Sabre and is stored like a VCARD, still don’t know why I can share with that user and if I can simply erase the value from the DB…

After more digging i’ve found that it the remain of a previous LDAP connexion with Zimbra,

I will try to remove the database entry manually and hope that it will not break anything