Can't create a new user in Nextcloud Hub 25 Autumn (32.0.2)

The Basics

  • Nextcloud Server version
    • Nextcloud Hub 25 Autumn (32.0.2)
  • Operating system and version
    • Linux 5.14.0-284.11.1.el9_2.x86_64 x86_64 - AlmaLinux 9.7 (Moss Jungle Cat)
  • Web server and version
    • Apache 2.4.65
  • Reverse proxy and version
    • No Reverse Proxy
  • PHP version:
    • 8.3.28 (PHP-FPM)
  • Is this the first time you’ve seen this error?
    • Yes
  • When did this problem seem to first start?
    • When I was at version 31.0.11
  • Installation method
    • It is a self-hosted server
  • Are you using CloudfIare, mod_security, or similar?
    • Yes, mod_security2 (2.9.12-2.4.1.cpanel) is installed with default settings

Summary of the issue I am facing:

I have Nextcloud Hub 25 Autumn (32.0.2) installed on my server. I am getting an error after submitting the Add User Account form. The error says:
“An error occurred during the request. Unable to proceed.”

However, when I reload the /setting/users page, it shows that user in the list, but without an avatar and email.

I checked under Administration > Logging, but there were no errors at all. I have set the filter logging level to Error and Fatal only.

I initially noticed this error on version 31.0.11 and upgraded it to 32.0.2 in the hope that he issue would get resolved, but no help.

I have checked the PHP version, PHP CLI, memory limit & modules, Linux & Apache user permissions, .htaccess file, and data folder permissions. All seems fine.

I have also tried:

php occ maintenance:repair
php occ files:scan-app-data
php occ files:scan --all

Tried this as well:

php occ user:clear-avatar-cache

Got this:

Clearing avatar cache has started
Segmentation fault (core dumped)

Steps to replicate it:

  1. From the admin account. I am going to the Accounts page and click on “+ New Account”

  2. Fill in the details like Account Name, Password and Email. Click on “Add new account”

  3. Post this, the error appears.

Log entries

Nextcloud

I emptied the log file and did the operation. It is still empty. No logs at all in the log file or the /admin/logging.


Web Browser

Here they are:

api.js:54  POST https://connect.invidev.com/ocs/v2.php/cloud/users 404 (Not Found)
(anonymous) @ xhr.js:198
xhr @ xhr.js:15
p @ dispatchRequest.js:51
_request @ Axios.js:185
request @ Axios.js:40
(anonymous) @ Axios.js:224
(anonymous) @ bind.js:5
post @ api.js:54
(anonymous) @ users.js:716
Promise.then
addUser @ users.js:715
(anonymous) @ vuex.esm.js:851
(anonymous) @ vuex.esm.js:516
(anonymous) @ vuex.esm.js:406
createUser @ NewUserDialog.vue:249
submit @ NewUserDialog.vue:1
fn @ vue.runtime.esm.js:3033
n @ vue.runtime.esm.js:1832
push.85471.Pr.i._wrapper @ vue.runtime.esm.js:7500
index.js:23 {…} {userid: 'John Doe', error: r}
API_FAILURE @ index.js:23
(anonymous) @ vuex.esm.js:844
(anonymous) @ vuex.esm.js:466
(anonymous) @ vuex.esm.js:465
(anonymous) @ vuex.esm.js:624
(anonymous) @ vuex.esm.js:464
(anonymous) @ vuex.esm.js:409
(anonymous) @ users.js:720
Promise.catch
addUser @ users.js:719
(anonymous) @ vuex.esm.js:851
(anonymous) @ vuex.esm.js:516
(anonymous) @ vuex.esm.js:406
createUser @ NewUserDialog.vue:249
submit @ NewUserDialog.vue:1
fn @ vue.runtime.esm.js:3033
n @ vue.runtime.esm.js:1832
push.85471.Pr.i._wrapper @ vue.runtime.esm.js:7500


{
    "userid": "John Doe",
    "error": {
        "message": "Request failed with status code 404",
        "name": "AxiosError",
        "stack": "AxiosError: Request failed with status code 404\n    at r (https://connect.invidev.com/dist/core-common.js?v=b49e4d8b-19:1:3250971)\n    at XMLHttpRequest.C (https://connect.invidev.com/dist/core-common.js?v=b49e4d8b-19:1:2857513)\n    at k.request (https://connect.invidev.com/dist/core-common.js?v=b49e4d8b-19:1:751908)",
        "config": {
            "transitional": {
                "silentJSONParsing": true,
                "forcedJSONParsing": true,
                "clarifyTimeoutError": false
            },
            "adapter": [
                "xhr",
                "http",
                "fetch"
            ],
            "transformRequest": [
                null
            ],
            "transformResponse": [
                null
            ],
            "timeout": 0,
            "xsrfCookieName": "XSRF-TOKEN",
            "xsrfHeaderName": "X-XSRF-TOKEN",
            "maxContentLength": -1,
            "maxBodyLength": -1,
            "env": {},
            "headers": {
                "Accept": "application/json, text/plain, */*",
                "Content-Type": "application/json",
                "requesttoken": "kx/0rGEjP4Dz7iLlp4ptsxf5Geq4qdt3AGhofUHy0kk=:pma5lQ51UMOdhHCC194o9U68aY2O24pGZ0MMBTurvmY=",
                "X-Requested-With": "XMLHttpRequest"
            },
            "method": "post",
            "url": "https://connect.invidev.com/ocs/v2.php/cloud/users",
            "data": "{\"userid\":\"John Doe\",\"password\":\"dfdsfdfds4343!@#\",\"displayName\":\"\",\"email\":\"john.doe@invidev.com\",\"groups\":[],\"subadmin\":[],\"quota\":\"default\",\"language\":\"en\"}",
            "allowAbsoluteUrls": true
        },
        "code": "ERR_BAD_REQUEST",
        "status": 404
    }
}

Web server / Reverse Proxy

Not Applicable


Configuration

Nextcloud

The output of occ config:list system

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "connect.invidev.com"
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "",
        "dbtype": "mysql",
        "version": "32.0.2.2",
        "overwrite.cli.url": "https:\/\/connect.invidev.com",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "simpleSignUpLink.shown": false,
        "theme": "",
        "default_phone_region": "IN",
        "app_install_overwrite": [
            "documentserver_community",
            "spreed"
        ],
        "maintenance_window_start": 1
    }
}

Apps

The output of occ app:list.

Enabled:
  - activity: 5.0.0-dev.0
  - appointments: 2.6.2
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.1
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.1.1
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.2
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - fileslibreofficeedit: 2.0.1
  - firstrunwizard: 5.0.0-dev.0
  - forms: 5.2.3
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - notify_push: 1.2.1
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - passwords: 2025.11.20
  - photos: 5.0.0-dev.1
  - previewgenerator: 5.11.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - richdocuments: 9.0.2
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.4
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - admin_audit: 1.22.0
  - app_api: 32.0.0 (installed 32.0.0)
  - circles: 32.0.0 (installed 32.0.0)
  - encryption: 2.20.0
  - files_external: 1.24.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - user_ldap: 1.23.0

Screenshots

Attached

Hey @kaushal welcome to the Nextcloud community :waving_hand:

does this only occur with that one user name or does it occor with any user account you’re trying to create?

  • check if that user exists occ user:list
  • enable that user if exists occ user:enable <username>
  • delete that user occ user:delete <username>
  • recreate that user occ user:add <username>

if that occurs with any user, then check your available disk space

Hello @scubamuc

Thanks for replying.

It happens for any user I am trying to create. I checked before creating, and the user didn’t exist.

However, when I am trying to create a user via:

occ user:add john.doe

It is throwing this error:

php occ user:add john.doe
Enter password:
Confirm password:
Segmentation fault (core dumped)

Strangely, the POST on api.js is returning a 404 error, as can be seen in the dev console errors I shared initially:

api.js:54  POST https://my.domain.com/ocs/v2.php/cloud/users 404 (Not Found)

This can also be confirmed from the object mentioned at the bottom as:

...
...

{
    "userid": "John Doe",
    "error": {
        "message": "Request failed with status code 404",
        "name": "AxiosError",
        "stack": "AxiosError: Request failed with status code 404\n    at r (https://my.domain.com/dist/core-common.js?v=b49e4d8b-19:1:3250971)\n    at XMLHttpRequest.C (https://my.domain.com/dist/core-common.js?v=b49e4d8b-19:1:2857513)\n    at k.request (https://my.domain.com/dist/core-common.js?v=b49e4d8b-19:1:751908)",
        "config": {
            "transitional": {
                "silentJSONParsing": true,
                "forcedJSONParsing": true,
                "clarifyTimeoutError": false
            },
            "adapter": [
                "xhr",
                "http",
                "fetch"
            ],
            "transformRequest": [
                null
            ],
            "transformResponse": [
                null
            ],
            "timeout": 0,
            "xsrfCookieName": "XSRF-TOKEN",
            "xsrfHeaderName": "X-XSRF-TOKEN",
            "maxContentLength": -1,
            "maxBodyLength": -1,
            "env": {},
            "headers": {
                "Accept": "application/json, text/plain, */*",
                "Content-Type": "application/json",
                "requesttoken": "kx/0rGEjP4Dz7iLlp4ptsxf5Geq4qdt3AGhofUHy0kk=:pma5lQ51UMOdhHCC194o9U68aY2O24pGZ0MMBTurvmY=",
                "X-Requested-With": "XMLHttpRequest"
            },
            "method": "post",
            "url": "https://my.domain.com/ocs/v2.php/cloud/users",
            "data": "{\"userid\":\"John Doe\",\"password\":\"dfdsfdfds4343!@#\",\"displayName\":\"\",\"email\":\"john.doe@invidev.com\",\"groups\":[],\"subadmin\":[],\"quota\":\"default\",\"language\":\"en\"}",
            "allowAbsoluteUrls": true
        },
        "code": "ERR_BAD_REQUEST",
        "status": 404
    }
}

What I suspect is, maybe POST https://my.domain.com/ocs/v2.php/cloud/users isn’t working because this is supposed to be redirected or re-routed by the NextCloud or .htaccess to some other destination, and the re-routing isn’t working due to some issue with the config or server environment or the latest update of NextCloud.

What are your thoughts?

cloudflare and cpanel… :face_with_peeking_eye:

that tells me, that your admin user profile has no valid email address? can you confirm? also check your admin settings to ensure that the SMTP email settings are correct. your admin email should be the same as the SMTP admin mail settings.

By this: “Yes, mod_security2 (2.9.12-2.4.1.cpanel) is installed with default settings”, I meant that my server has this mod_security2 Apache Module enabled. I am not using CloudFlare. The VPS server has a cPanel/WHM installed with default settings.

The admin account has a valid email address, and I can see it in the users list.

The SMTP email settings are correct, I just checked. However, the admin email is different from the one entered in the Administration > Basic Settings > Email server

In fact, it is like that only from the time we set up NextCloud on this server, and everything was working fine, including the sending of notification emails, which are still working. I too checked the “Test and verify email settings” by clicking on the button “Send email”, and it is working as expected.

What am I missing now @scubamuc ?

@kaushal sorry, I’m out of ideas…

… but be patient, there are some really clued up folks here who’ll certainly be able to help :+1:

1 Like

@scubamuc Looking forward to it.

Side Note: My disk space is 64% full. This seems to be ok.

@scubamuc After a bunch of testing, I found the cause of this issue.

My Server has a cPanel/WHM 132.0.9 (with EasyApache 4) on AlmaLinux 9.7, where Imagick loads system libxml2 (2.9.13), PHP loads EA-libxml2 (2.15.1), causing a conflict and thus the segmentation fault.

This is impossible to fix without:

  • Recompiling Imagick (link against EA-libraries) - Risky

  • OR changing the system library paths - Risky

  • OR downgrading EA-libxml2 - Risky

  • OR disabling Imagick entirely - Safe

So, for now, I disabled Imagick for PHP 8.3, and it solved the problem as Nextcloud will fall back to gd for avatar generation.

Also, I was able to see the entry in the DB because the user is created in DB → visible in list → but post-creation hooks (avatar, appdata init, notification templates, session writes) CRASH due to PHP segfault.

So, I believe that this is something the cPanel dev team or Almalinux dev team should be looking after. If not, @Andy @juliusknorr, please look into this, as this will affect many Nextcloud users globally who are running Nextcloud on cPanel/WHM.

However, my setup is a standard cPanel/WHM setup, and I haven’t changed any system-level components. So, that means it will be the same case for anybody having the same setup as mine. I believe the cPanel team should come up with an update soon to resolve this, or Nextcloud could do a workaround for this.

A Quick query: Will this issue get resolved if I update to Almalinux 10.1, as it will ship with the latest libxml2, which could match the PHP-loaded EA-libxml?

wow… who would have guessed that imagick was the cause, well done!

for interest sake, even though you don’t use the snap, we don’t enable imagick at all for the snap FAQ's · nextcloud-snap/nextcloud-snap Wiki · GitHub

Imagick is a security concern, and as such isn’t enabled on purpose! You see this warning because the theming app uses Imagick to generate favicons. As a result, that particular feature (favicon generation) isn’t possible while using the snap.

as an alternative you could use generate image previews in Nextcloud with Imaginary with docker, but you’ll find favicons usually work without imagick enabled and there’s a simple workaround: simply upload a favicon.ico in the theming app in admin section…

that’s something you’ll have to ask the devs on github as that’s very specific to Almalinux and devs don’t usually hang out here :shushing_face:

meanwhile glad you could get that sorted… good job, well done

1 Like

Thanks for the quick response @scubamuc

I see.

I believe that Imaginary is faster and reliable as compared to gd (php-gd) for image previews or avatar generation, that’s why you mentioned it, but if gd and Imaginary are similar in performance, why take the hassle of adding it? We can stick to the default - gd.

open source… you have the choice, hassle or non :laughing: