root@syncloud:~# snap refresh nextcloud
error: cannot perform the following tasks:
- Run configure hook of “nextcloud” snap if present (run hook “configure”:
2022-01-03 19:01:21,073 - nextcloud_config - INFO - setting value: datadirectory = /opt/disk/internal/nextcloud
{“reqId”:“tiGdYDWPnVQr7QZ8NYeQ”,“level”:3,“time”:“2022-01-03T19:01:22+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“Exception: Not installed at /snap/nextcloud/211228447/nextcloud/lib/base.php#277”,“userAgent”:"–",“version”:""}
2022-01-03 19:01:22,081 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c “ALTER USER nextcloud WITH PASSWORD ‘nextcloud’;”
2022-01-03 19:01:22,266 - database - INFO - ALTER ROLE
2022-01-03 19:01:22,800 - nextcloud_occ - ERROR - occ error: Cannot write into “apps” directory
This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /snap/nextcloud/211228447/nextcloud/lib/private/Console/Application.php:164
Stack trace:
#0 /snap/nextcloud/211228447/nextcloud/console.php(98): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /snap/nextcloud/211228447/nextcloud/occ(11): require_once(’/snap/nextcloud…’)
#2 {main}
Traceback (most recent call last):
File “/snap/nextcloud/211228447/meta/hooks/configure”, line 7, in
Installer().configure()
File “/snap/nextcloud/211228447/hooks/installer.py”, line 110, in configure
self.initialize(app_storage_dir)
File “/snap/nextcloud/211228447/hooks/installer.py”, line 195, in initialize
self.occ.run(‘maintenance:install --database pgsql --database-host {0}:{1}’
File “/snap/nextcloud/211228447/hooks/octools.py”, line 19, in run
raise e
File “/snap/nextcloud/211228447/hooks/octools.py”, line 13, in run
output = check_output(’{0} {1}’.format(self.occ_runner_path, args), shell=True).decode().strip()
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘/snap/nextcloud/current/bin/occ-runner maintenance:install --database pgsql --database-host /var/snap/nextcloud/current/database:5436 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user installer --admin-pass 4a1aaf72201c470bba55d22c080c04a7 --data-dir /opt/disk/internal/nextcloud’ returned non-zero exit status 1.
-----)
root@syncloud:~#