Hi,
While scanning the music of one of my users XX who get his music from a share from a second account YY I got a cryptic error.
sudo -u www-data php ./occ music:scan --debug --debug --debug XX
Error :
In File.php line 112:
[OCP\Files\NotPermittedException]
It is very cryptic and does not provide any info to be able to debug.
For the error message the issue seems to be in ./lib/private/Files/Node/File.php
if ($this->checkPermissions($requiredPermissions)) {
$this->sendHooks($preHooks);
$result = $this->view->fopen($this->path, $mode);
$this->sendHooks($postHooks);
return $result;
} else {
throw new NotPermittedException();
}
}
I suggest to have the following upgrade
if ($this->checkPermissions($requiredPermissions)) {
$this->sendHooks($preHooks);
$result = $this->view->fopen($this->path, $mode);
$this->sendHooks($postHooks);
return $result;
} else {
throw new NotPermittedException('Could not open (Incorrect mode ' . $mode . ') ' . $this->path);
}
}