danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 71 forks source link

Unable to access smb external storage #110

Closed N3viden closed 4 years ago

N3viden commented 4 years ago

Hi,

Firstly I'd like to thank @danb35 so much for making this script, I'm just beginning to learn FreeNAS from the beginning and Nextcloud is one of my essential apps.

Installation was a breeze, however, I've discovered an issue when trying to access my external storage smb share. The smb share is added successfully in the 'external storages' area and is represented by a green tick, I can also access this successfully through windows/linux on other devices on the network:

iexplore_2020-04-26_00-41-04

As soon as I try to open the external folder under either admin or another test user created I receive an 'Internal Server Error':

iexplore_2020-04-26_00-42-57

Reviewing the nextcloud server log and there are 2 errors and one failure:

iexplore_2020-04-26_00-44-11

  Sabre\DAV\Exception: Invalid request for / (InvalidTypeException)/usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 418: OCA\DAV\Connector\Sabre\File->convertToSabreException(Icewind\SMB\ ... {})/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 85: OCA\DAV\Connector\Sabre\File->get()<>Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit("method:GET", [ Sabre\HTTP ... }])/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/usr/local/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 82: Sabre\DAV\Server->exec()/usr/local/www/nextcloud/remote.php - line 165: require_once("/usr/local/ ... p")Caused by Icewind\SMB\Exception\InvalidTypeException: Invalid request for / (InvalidTypeException)/usr/local/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 66: Icewind\SMB\Exception\Exception::fromMap({ 1: "Icewin ... "}, 21, "/")/usr/local/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 78: Icewind\SMB\Native\NativeState->handleError("/")/usr/local/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 212: Icewind\SMB\Native\NativeState->testResult(false, "smb://172.16.0.10/files/")/usr/local/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php - line 263: Icewind\SMB\Native\NativeState->open("smb://172.16.0.10/files/", "r")/usr/local/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 416: Icewind\SMB\Native\NativeShare->read("/")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 299: OCA\Files_External\Lib\Storage\SMB->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 122: OC\Files\Storage\Wrapper\Wrapper->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 299: OC\Files\Storage\Wrapper\PermissionsMask->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 314: OC\Files\Storage\Wrapper\Wrapper->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 860: OC\Files\Storage\Wrapper\Availability->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 929: OC\Files\Storage\Wrapper\Encryption->readFirstBlock("")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 382: OC\Files\Storage\Wrapper\Encryption->getHeader("")/usr/local/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 299: OC\Files\Storage\Wrapper\Encryption->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/View.php - line 1160: OC\Files\Storage\Wrapper\Wrapper->fopen("", "r")/usr/local/www/nextcloud/lib/private/Files/View.php - line 996: OC\Files\View->basicOperation("fopen", "/files", [ "read"], "r")/usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 416: OC\Files\View->fopen("files", "r")/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 85: OCA\DAV\Connector\Sabre\File->get()<>Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit("method:GET", [ Sabre\HTTP ... }])/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/usr/local/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 82: Sabre\DAV\Server->exec()/usr/local/www/nextcloud/remote.php - line 165: require_once("/usr/local/ ... p")

Any help greatly appreciated, thank you :)

PrivatePuffin commented 4 years ago

@N3viden May I ask why you try to connect using smb, while you are running it on FreeNAS? Normally you just mount your files within freeNAS and not mess with SMB.

The Internal Server error looks pretty much like some sort of "permission denied" btw.

N3viden commented 4 years ago

@Ornias1993 Thanks for your reply. I eventually found this is a reported bug with the latest release of Nextcloud so waiting for a future patch. The reason for wanting to mount SMB is because I have an existing windows SMB shares elsewhere with a lot of different permissions applied.