Change path of downloaded updates

I am looking to find a way to change the file path that the web updater downloads files to.
I am running into a file permission issue I believe when updating.

Currently I am on Nextcloud 19.0.6 with Debian Buster as the OS.
My data directory is currently a mounted NFS share on my virtual FreeNAS box. My config.php entry for the data folder is as:

'datadirectory' => '<NextcloudDataPath>',

My /etc/fstab file as a line with the following information for mounting the NFS share:

<FreeNAS IP>:/<SharePath> <NextcloudDataPath> nfs rw,async,hard,intr,noexec 0 0

Both paths are the same for the datadirectory and my NFS mount path. All of the files in this NFS share when doing a ls -l show that ownership is root:root. However I am fully able to add new file, edit and remove files in my instance.

The problem comes up when attempting to run the updater via the web or via the CLI. For some reason the updater folder gets permissions that it doesn’t like which then locks up the installer process. The only way to update is then manually updating by removing all but the config/ folder and moving all new files back in place. (Updating installed apps works no issue)

Is there a way in the config.php to specify a new path so I can point this path to somewhere outside my NFS share?

My apache2 config:

<VirtualHost *:443>
ServerName nextcloud.

        ServerAdmin <myemail>
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/html/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
<IfModule mod_dav.c>
Dav off
SetEnv HOME /var/www/html
SetEnv HTTP_HOME /var/www/html

<Proxy "https://nextcloud.<mydomain>/updater/">
  ProxySet connectiontimeout=6000 timeout=6000

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/nextcloud.<mydomain>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nextcloud.<mydomain>/privkey.pem
SSLOpenSSLConfCmd Curves X448:secp521r1:secp384r1:prime256v1
SSLOpenSSLConfCmd ECDHParameters secp384r1
1 Like

looks like I’ve a similar problem. Did you find any solution?

Hi @Resk and @DanielJay,

I too am having trouble upgrading with a data folder that is mounted over NFS.

How did you manage doing this ?

Could you share a step by step guide ?

So far, here is what I tried:

  • Backup config.php
  • Launch Upgrade from WebGUI
  • It fails at “Moving files” (almost last step)
  • From the data folder, in the “updater-xxxxxxxxxxxx/downloads” folder, move the ‘nextcloud’ folder, replacing the old one that sits in ‘/var/www’.
  • Replace config.php with backed-up one
  • run ‘occ upgrade’

This didn’t work for me… the ‘occ’ tool throws another exception.

Let me know how you did it if you managed to upgrade !