I found a solution, which is working on two Raspberry Pis. Use it with caution, I’m just a beginner on this topic.
Procedure
- Locate config.php
cd /var/www/nextcloud/config
- Edit config.php
nano config.php
- Change line for tempdirectory
‘tempdirectory‘ => ‘/media/USBdrive/ncdata/tmp’
(example)
to
‘tempdirectory‘ => ‘/var/www/nextcloud/data/tmp’
The new folder is located on the SD-card and should have following rights
drwxr-xr-x 2 www-data www-data
-
Save and Exit by Ctrl+S and Ctrl+X
-
Reboot the server
-
Test it by transferring a larger file (should work now)
-
Undo the changes in config.php and reboot again (now the temp directory should be located on the USB drive again and transferring should work)
Best wishes!
EDIT:
Also check /etc/php/7.3/fpm/php.ini
as mentioned from @OliverV below.