I tried as root and as zammad user.
First time I had the problem on a test machine where a couple of things were configured (wrong?). So I tried with a fresh CentOS install (only installed zammad, created the admin user and deleted default user “Nicole Braun”), but I still couldn’t recreate the database.
Is there a ‘hidden secret’ like with the dropping command which I am too blind to see?
So, is the documentation wrong on that part? As it addresses package installations.
Quote from documentation: (link in my first post)
If you installed the Zammad DEB or RPM package
$ zammad run rake db:drop
$ zammad run rake db:create
$ zammad run rake db:migrate
$ zammad run rake db:seed
What I did now:
I changed to user postgres and created the database manually with psql -c "CREATE DATABASE zammad OWNER zammad;"
After that the migrate and seed commands ran without errors.
Is that a proper way to do it? Or could it lead to problems when updating the package later?
To sum it up (for me): User zammad may not create the database, but user postgres may not execute the zammad run rake ... commands, only zammad and root may. Therefore I cannot just send the four commands as postgres.
Is that the problem behind the error I got?
Technically it’s not incorrect.
It simply depends on your zammad users permission.
By default, as far as I’m aware, the zammad user is not allowed to create zammad* namespaced databases which is the technical root of issue.
This method is absolutely fine, no need to worry!
zammad run .... requires to be run either as user zammad or root - any other user of your system will bring issues.