Install Errors/No Database Rights

From DAViCal Wiki

Jump to: navigation, search
You will see this error if the user you are trying to run the
dba/create_database.sh
script as cannot access the database in order to create database users for the application and create the 'davical' database.

There are several variations on resolving the issue:

  • Database on Local Server (you need to grant access to it)
  • Database on Remote Server (you need to tell the script where it is)

Database on Local Server

If the database for DAViCal is on the local server then you will need to edit the pg_hba.conf file to give appropriate permissions to the database administration user (usually 'davical_dba') as well as giving permissions to the application user (usually 'davical_app').

Note that this only gives permissions for those users to connect to the database. DAViCal will restrict the rights of those database users to the specific minimum access needed for them to do their jobs. The davical_dba user does not need rights to create databases or users, but it does need to own all the tables.

The
dba/create_database.sh</dba> script will need to be run by a user who <em>does</em> have the right to create users and databases, however.  Normally this is the 'postgres' user.

=== Database on Remote Server or non-default port ===
If the database is on a remote server then (as well as having to grant permissions, as above) you will need to set a few environment variables (PGPORT, PGHOST, PGCLUSTER) in order that the correct database server is used.
Personal tools