#3075·seafile

update-user-ccnet-email allows mixed-case email and breaks desktop client sync

Author: SuperPyroManiacCreated Sep 7, 2026Updated Sep 8, 2026
Labelstype-possiblyabugpriority-medium

Version Seafile Pro 13.0.27

What happened I changed my admin user ID (email) using:

PUT /api/v2.1/admin/update-user-ccnet-email/ The old ID was a different email address, and the new ID I supplied was mixed case ex: [email protected]

The API returned 200/success and everything initially appeared to work. I could log in, all libraries were present, the admin panel showed the correct owner, and WebDAV worked.

But, the native Seafile desktop client could no longer sync any libraries. Trying to set up a sync resulted in "Permission denied on server".

I reproduced this with a completely fresh Seafile client configuration as well, so it wasn't stale client state.

What I found The migrated user was stored as: [email protected]

For example, ccnet_db.EmailUser and seafile_db.RepoOwner contained the mixed-case ID.

New RepoUserToken entries created by the desktop client were instead using:

[email protected]

I checked the permissions through seaserv and got:

check_permission(repo, "[email protected]") -> None check_permission(repo, "[email protected]") -> "rw"

All of the affected repositories had status=0 and permission='rw' for the lowercase ID.

I also tested a newly generated repo token directly against the local fileserver, bypassing the desktop client, reverse proxy, etc:

GET /repo//permission-check/?op=upload

This returned:

HTTP 403 {"reason":"no permission","unsyncable_path":"/"}

So the 403 was being generated locally by the Seafile fileserver.

Interestingly, WebDAV worked normally throughout this and accepted the lowercase email.

Workaround I first tried using update-user-ccnet-email again to change:

[email protected] -> [email protected]

but this returned:

400 {"error_msg":"User [email protected] already exists."}

I was able to work around this by using a temporary ID:

[email protected] -> [email protected] -> [email protected]

Both migrations returned success.

After the final migration, EmailUser and RepoOwner were using the lowercase ID and native desktop sync immediately started working again.

Expected behavior I think update-user-ccnet-email should either normalize the new user ID/email to lowercase before performing the migration, or reject a mixed-case email.

Currently it accepts the mixed-case ID and reports a successful migration, but this can leave the account in a state where the web interface/WebDAV work while native sync gets a 403.

It also isn't possible to fix the casing afterward with a direct case-only migration because the API reports that the lowercase user already exists.

Regardless if this is something that will be fixed, hopefully anyone else who googles this issue in the future can find this helpful as I spent far to long trying to figure this out. Considering it's the only native way to change the admin email, I think it's worth looking into.