Nextcloud version: 25.0.3.2
Operating system and version: Debian GNU/Linux 11. 5.15.61-v8+ (aarch64)
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version: 8.1
The issue you are facing:
after installation of NextCloudPi (NCP) v1.51.0 on a RaspberryPi NextCloud server, then configuring an external SSD to hold all user data and user database, then connecting a NextCloud desktop client v3.7.3
from Windows v10.0.18363 OS:
- the already existing files are NOT transferred to the server, but
- the complete folder structure is correctly visible via web and other clients
the desktop client shows tons of error messages of two different types:
- “connection closed” for specific files
- ~“different size files read than written unto server” for other files (see image)
Is this the first time you’ve seen this error? YES
After three days of trying different variations of upload configurations, I thought, this one would be the simplest, but even this does not work.
Steps to replicate it:
- connect to USB and mount SSD (btrfs) containing just old backups
- prepare ncdata and ncdatabase folders on SSD to be connected via NCP
- within NCP: set ncdata and ncdatabase folders to point to SSD
- create a primary NC user “user1” using the “ncp” admin user
- re-configure letsencrypt to be easily reachable from the outside
- create valid exclude-list on client, to not upload everything
- activate NC client for “user1” on Windows desktop
→ now, synchronization starts, but shows the described errors
→ folders are created on the server side, but no files are transferred
The output of your Nextcloud log in Admin > Logging:
...
Fehler no app in context Sabre\DAV\Exception\BadRequest: Expected filesize of 60091 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. 2023-02-10T17:50:11+0100
Fehler PHP Error: fread(): Unable to create temporary file, Check permissions in temporary files directory. at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 2023-02-10T17:50:11+0100
Fehler PHP Error: fread(): file created in the system's temporary directory at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 2023-02-10T17:50:11+0100
Fehler no app in context Sabre\DAV\Exception\BadRequest: Expected filesize of 30572 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. 2023-02-10T17:50:11+0100
Fehler PHP Error: fread(): Unable to create temporary file, Check permissions in temporary files directory. at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 2023-02-10T17:50:11+0100
Fehler PHP Error: fread(): file created in the system's temporary directory at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 2023-02-10T17:50:11+0100
Fehler no app in context Sabre\DAV\Exception\BadRequest: Expected filesize of 36072 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. 2023-02-10T17:50:10+0100
Fehler PHP Error: fread(): Unable to create temporary file, Check permissions in temporary files directory. at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 2023-02-10T17:50:10+0100
Fehler PHP Error: fread(): file created in the system's temporary directory at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 2023-02-10T17:50:10+0100
...
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'passwordsalt' => 'ZGg/Gh+YmNmegl2SjBOeaP2FvJnFT7',
'secret' => 'orNgQLpnWKWjIHDOlMU7FXLu2tRea6kyTY8NWpLOaq21DARg',
'trusted_domains' =>
array (
0 => 'localhost',
7 => 'nextcloudpi',
5 => 'nextcloudpi.local',
8 => 'nextcloudpi.lan',
3 => '[ snip ]',
11 => '[ snip ]',
1 => '192.168.1.89',
14 => 'RPi-10',
),
'datadirectory' => '/media/SSD240GB/ncdata/data',
'dbtype' => 'mysql',
'version' => '25.0.3.2',
'overwrite.cli.url' => 'https://[ snip ]/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ncadmin',
'dbpassword' => '[ snip ]',
'installed' => true,
'instanceid' => 'occqjdyc2czx',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
'password' => '[ snip ]',
),
'tempdirectory' => '/media/SSD240GB/ncdata/data/tmp',
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'admin',
'mail_domain' => 'ownyourbits.com',
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'overwriteprotocol' => 'https',
'maintenance' => false,
'logfile' => '/media/SSD240GB/ncdata/data/nextcloud.log',
'trusted_proxies' =>
array (
11 => '127.0.0.1',
12 => '::1',
13 => '[ snip ]',
14 => '[ snip ]',
),
);
The output of your Apache system log in /var/log/apache2/nc.error.log
:
[Fri Feb 10 14:28:48.480172 2023] [proxy_fcgi:error] [pid 15919:tid 546844950912] [client 77.0.66.46:53047] AH01071: Got error 'PHP message: PHP Notice: Unknown: file created in the system's temporary directory in Unknown on line 0PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0'
[Fri Feb 10 14:28:49.848707 2023] [proxy_fcgi:error] [pid 15860:tid 546844950912] [client 77.0.66.46:53051] AH01071: Got error 'PHP message: PHP Notice: Unknown: file created in the system's temporary directory in Unknown on line 0PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0'
[Fri Feb 10 14:28:50.393144 2023] [proxy_fcgi:error] [pid 15860:tid 546828165504] [client 77.0.66.46:53052] AH01071: Got error 'PHP message: PHP Notice: Unknown: file created in the system's temporary directory in Unknown on line 0PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0'
[Fri Feb 10 14:28:51.340630 2023] [proxy_fcgi:error] [pid 15919:tid 547637105024] [client 77.0.66.46:53054] AH01071: Got error 'PHP message: PHP Notice: Unknown: file created in the system's temporary directory in Unknown on line 0PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0'
[Fri Feb 10 14:28:52.907226 2023] [proxy_fcgi:error] [pid 15860:tid 546308080000] [client 77.0.66.46:53053] AH01071: Got error 'PHP message: PHP Notice: Unknown: file created in the system's temporary directory in Unknown on line 0PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0'
[Fri Feb 10 14:28:53.981111 2023] [proxy_fcgi:error] [pid 15919:tid 546735911296] [client 77.0.66.46:53058] AH01071: Got error 'PHP message: PHP Notice: Unknown: file created in the system's temporary directory in Unknown on line 0PHP message: PHP Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0PHP message: PHP Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0'
...
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
...
{"reqId":"Y-Z11xQ8b5DQBJdsZoXjFAAAAAM","level":3,"time":"2023-02-10T16:50:31+00:00","remoteAddr":"77.0.66.46","user":"user1","app":"PHP","method":"PUT","url":"/remote.php/dav/files/user1/PRJ__Zimmervermietung/_tools/booking/libArray.bas","message":"fread(): Unable to create temporary file, Check permissions in temporary files directory. at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55","userAgent":"Mozilla/5.0 (Windows) mirall/3.7.3stable-Win64 (build 20230209) (Nextcloud, windows-10.0.18363 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.3.2","exception":{"Exception":"Error","Message":"fread(): Unable to create temporary file, Check permissions in temporary files directory. at /var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":55,"function":"fread"},{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php","line":96,"function":"stream_read","class":"Icewind\\Streams\\Wrapper","type":"->"},{"function":"stream_read","class":"Icewind\\Streams\\CallbackWrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Local.php","line":311,"function":"file_put_contents"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Local.php","line":613,"function":"file_put_contents","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":248,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"Y-Z11xQ8b5DQBJdsZoXjFAAAAAM","level":3,"time":"2023-02-10T16:50:31+00:00","remoteAddr":"77.0.66.46","user":"user1","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/user1/PRJ__Zimmervermietung/_tools/booking/libArray.bas","message":"Expected filesize of 131139 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Windows) mirall/3.7.3stable-Win64 (build 20230209) (Nextcloud, windows-10.0.18363 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 131139 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 131139 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":{},"CustomMessage":"Expected filesize of 131139 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}
...
hope that someone might help…
EDIT:
base folder on SSD filesystem containing access information:
nnako@RPi-10:/media/SSD240GB $ ls -al
total 332
drwxr-xr-x 1 root root 276 Feb 10 14:06 .
drwxr-xr-x 3 root root 4096 Feb 10 12:59 ..
drwxr-x--- 1 www-data www-data 286 Jul 5 2021 bkp_ncdata_20210706
drwxr-x--- 1 www-data www-data 262 Dec 12 2021 bkp_ncdata_2023-02-07
drwxr-xr-x 1 dnsmasq avahi 266 Jul 5 2021 bkp_ncdatabase_20210705
drwxr-xr-x 1 dnsmasq mysql 318 Feb 7 19:35 bkp_ncdatabase_2023-02-07
drwxr-xr-x 1 root root 8 Feb 10 14:01 ncdata
drwxr-xr-x 1 mysql mysql 308 Feb 10 14:06 ncdatabase
drwxr-xr-x 1 root root 294 Jan 15 03:00 ncp-backups
-rw------- 1 root root 317440 Jul 6 2021 ncp-config_20210706.tar
Maybe that helps also… I would have expected “www-data” to be a better access info for ncdata
than root
, but I am not sure…
Thanks.