Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,15 @@
*/
'tempdirectory' => '/tmp/nextcloudtemp',

/**
* Override where Nextcloud stores update files while updating. Useful in situations
* where the default `datadirectory` is on network disk like NFS, or is otherwise
* restricted. Defaults to the value of `datadirectory` if unset.
*
* The Web server user must have write access to this directory.
*/
'updatedirectory' => '',

/**
* Hashing
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Repair/MoveUpdaterStepFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public function getName() {
}

public function run(IOutput $output) {
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
$updateDir = $this->config->getSystemValue('updatedirectory') ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
$instanceId = $this->config->getSystemValue('instanceid', null);

if (!is_string($instanceId) || empty($instanceId)) {
return;
}

$updaterFolderPath = $dataDir . '/updater-' . $instanceId;
$updaterFolderPath = $updateDir . '/updater-' . $instanceId;
$stepFile = $updaterFolderPath . '/.step';
if (file_exists($stepFile)) {
$output->info('.step file exists');
Expand Down