Hello,
I downloaded the newest NC 20 VM from ttps://www.hanssonit.se/nextcloud-vm/ . I am trying to migrate from Nextcloud Snap in an Ubuntu 20 VM to the official VM, but ran into a wall.
I was in the process of restoring the database as per official docs when I hit a permissions issue. I was able to drop the database, but was then blocked from creating a new one.
ncadmin@nextcloud:~$ PGPASSWORD="1234567890" psql -U ncadmin -d template1 -c "DROP DATABASE \"nextcloud_db\";"
DROP DATABASE
ncadmin@nextcloud:~$ PGPASSWORD="1234567890" psql -U ncadmin -d template1 -c "CREATE DATABASE \"nextcloud_db\";"
ERROR: permission denied to create database
Full config:
root@nextcloud:/var/www/nextcloud# cat config/config.php
<?php
$CONFIG = array (
'passwordsalt' => 'a6qkljshf92',
'secret' => 'asdlkfjhwe982345',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '192.168.1.144',
2 => 'mydomain.ddns.org',
3 => 'mydomain.ddns.org',
),
'datadirectory' => '/mnt/ncdata',
'dbtype' => 'pgsql',
'version' => '20.0.0.9',
'overwrite.cli.url' => 'https://mydomain.ddns.org/',
'dbname' => 'nextcloud_db',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'ncadmin',
'dbpassword' => '1234567890',
'installed' => true,
'instanceid' => 'och5mtox047w',
'upgrade.disable-web' => 'true',
'log_type' => 'file',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'loglevel' => '2',
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'mail_smtpmode' => 'smtp',
'remember_login_cookie_lifetime' => '1800',
'log_rotate_size' => '10485760',
'trashbin_retention_obligation' => 'auto, 180',
'versions_retention_obligation' => 'auto, 365',
'simpleSignUpLink.shown' => false,
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => true,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.5,
'dbindex' => 0,
'password' => 'abcdefg',
),
'logtimezone' => 'Etc/UTC',
'htaccess.RewriteBase' => '/',
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
11 => 'OC\\Preview\\PNG',
12 => 'OC\\Preview\\JPEG',
13 => 'OC\\Preview\\GIF',
14 => 'OC\\Preview\\BMP',
15 => 'OC\\Preview\\MarkDown',
16 => 'OC\\Preview\\MP3',
17 => 'OC\\Preview\\TXT',
18 => 'OC\\Preview\\Movie',
),
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'maintenance' => true,
);
I have changed the name of my domain, all the passwords, and the salts. The rest is the same.