I connect to NC as external storage to a different server with SFTP. I was faced with the problem of not being able to open those files.
I have access to it itself. The list of files also appears fine. However, when the user tries to open the file, the following error appears.
Error Loading FILENAME
The following error occurs when the user attempts to download.
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Nextcloud’s error log is below.
[PHP] Error: fopen(sftpread://MY-SECONDSERVER/ext-drive/sp//Under11/DSC01987.JPG): failed to open stream: "OCA\Files_External\Lib\Storage\SFTPReadStream::stream_open" call failed at /MY-NEXTCLOUD/apps/files_external/lib/Lib/Storage/SFTP.php#378
[PHP] Error: fread() expects parameter 1 to be resource, bool given at /MY-NEXTCLOUD/lib/private/Files/Storage/Wrapper/Encryption.php#861
[PHP] Error: fclose() expects parameter 1 to be resource, bool given at /MY-NEXTCLOUD/lib/private/Files/Storage/Wrapper/Encryption.php#862
I unregistered the external storage once and then tried to reconnect. But the situation remained the same.
I’m curious about “sp//Under11”. For some reason, there are two slashes.
I’m stopping at “sp” for the description in the external storage settings and not including the slash at the end of the word.
But not all of them, apparently. There are also external storage folders that user can access.
What are the causes of unconnected external storage?
CentOS 7.7, Nextcloud 19.0.0, PHP 7.3.18, nginx 1.16.1, MariaDB 10.2.32, External Storage Support 1.10.0