Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root directory unvailable, if share on external storage is offline #16880

Closed
ManOki opened this issue Aug 27, 2019 · 5 comments
Closed

root directory unvailable, if share on external storage is offline #16880

ManOki opened this issue Aug 27, 2019 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage needs info

Comments

@ManOki
Copy link

ManOki commented Aug 27, 2019

Steps to reproduce

  1. Setup SMB share on Machine NAS
  2. Setup External Storage /mysmb inside nextcloud as user ME on Machine SERVER
  3. Share subdirectory /mysmb/public as user ME to user FRIEND
  4. Logout user ME and FRIEND from nextcloud
  5. Shutdown Machine NAS
  6. Login as user FRIEND (but not user ME before)

Expected behaviour

User FRIEND should see all his files. The share should be an empty directory and an error message should be shown, if opened.

Actual behaviour

User FRIEND does not see any of his files, but an overall error message is shown: This directory is unavailable, please check the logs or contact the administrator

Workaround

Login as aser ME and refresh the files view before last step. Nextcloud somehow recognized, that the SMB share is offline. In this case, user FRIEND is able to see his files, but there is no (not even empty) directory for the missing share in the regular files view. There is just an entry inside the shareoverview, which leads to the error message operation is not allowed, if clicked.

Server configuration

Operating system: Debian Buster

Web server: Apache 2.4.38

Database: MariaDB 10.3

PHP version: Php 7.3

Nextcloud version: 16.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updated since owncloud 6

Where did you install Nextcloud from: updater.phar

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.9.1
  - admin_audit: 1.6.0
  - apporder: 0.7.1
  - audioplayer: 2.7.2
  - calendar: 1.7.0
  - camerarawpreviews: 0.7.0
  - checksum: 0.4.3
  - cloud_federation_api: 0.2.0
  - contacts: 3.1.3
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - files: 1.11.0
  - files_external: 1.7.0
  - files_markdown: 2.0.6
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - gallery: 18.3.0
  - impersonate: 1.3.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - mail: 0.15.2
  - metadata: 0.9.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - previewgenerator: 2.1.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - recommendations: 0.4.0
  - serverinfo: 1.6.0
  - spreed: 6.0.4
  - tasks: 0.11.1
  - twofactor_backupcodes: 1.5.0
  - viewer: 1.1.0
  - workflowengine: 1.6.0
Disabled:
  - accessibility
  - circles
  - comments
  - encryption
  - federation
  - files_retention
  - firstrunwizard
  - groupfolders
  - nextcloud_announcements
  - password_policy
  - quota_warning
  - richdocuments
  - sharebymail
  - support
  - survey_client
  - systemtags
  - theming
  - updatenotification
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "16.0.4.1",
        "updatechecker": false,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "forcessl": true,
        "trusted_domains": [
            "server1",
            "server2",
            "server3"
        ],
        "loglevel": 3,
        "logtimezone": "UTC",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/localhost\/nextcloud",
        "trashbin_retention_obligation": "auto",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "enable_previews": true,
        "preview_max_filesize_image": -1,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\Illustrator",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOffice2007",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\Postscript",
            "OC\\Preview\\StarOffice",
            "OC\\Preview\\SVG",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Font"
        ],
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "maintenance": false,
        "theme": "",
        "defaultapp": "apporder",
        "htaccess.RewriteBase": "\/nextcloud",
        "overwritewebroot": "\/nextcloud",
        "updater.release.channel": "stable",
        "auth.bruteforce.protection.enabled": false,
        "mysql.utf8mb4": true
    }
}

Are you using external storage, if yes which one: smb

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: any client fails, e.g. Firefox 68.0.2, nextcloud desktop client, nextcloud android client

Operating system: Windows 10

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log
Icewind\SMB\Exception\InvalidArgumentException: Invalid request for /mysmb/public (InvalidArgumentException)

    /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 62:

    Icewind\SMB\Exception\Exception::fromMap({ 1: "Icewin ... "}, 22, "/mysmb/public")

    /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 74:

    Icewind\SMB\Native\NativeState->handleError("/mysmb/public")

    /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 184:

    Icewind\SMB\Native\NativeState->testResult(false, "smb://NAS- ... e")

    /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php - line 133:

    Icewind\SMB\Native\NativeState->stat("smb://NAS- ... e")

    /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php - line 112:

    Icewind\SMB\Native\NativeShare->getStat("/mysmb/public")

    /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 170:

    Icewind\SMB\Native\NativeShare->stat("/mysmb/public")

    /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 518:

    OCA\Files_External\Lib\Storage\SMB->getFileInfo("/mysmb/public")

    /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 110:

    OCA\Files_External\Lib\Storage\SMB->filetype("public")

    /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 144:

    OC\Files\Storage\Common->is_dir("public")

    /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 164:

    OC\Files\Storage\Common->isCreatable("public")

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 215:

    OC\Files\Storage\Common->getPermissions("public")

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 230:

    OC\Files\Storage\Wrapper\Wrapper->getPermissions("public")

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 215:

    OC\Files\Storage\Wrapper\Availability->getPermissions("public")

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 79:

    OC\Files\Storage\Wrapper\Wrapper->getPermissions("public")

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Jail.php - line 220:

    OC\Files\Storage\Wrapper\PermissionsMask->getPermissions("public")

    /var/www/nextcloud/apps/files_sharing/lib/SharedStorage.php - line 199:

    OC\Files\Storage\Wrapper\Jail->getPermissions("")

    /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 215:

    OCA\Files_Sharing\SharedStorage->getPermissions("")

    /var/www/nextcloud/apps/files_sharing/lib/Cache.php - line 148:

    OC\Files\Storage\Wrapper\Wrapper->getPermissions("")

    /var/www/nextcloud/apps/files_sharing/lib/Cache.php - line 114:

    OCA\Files_Sharing\Cache->formatCacheEntry(OC\Files\Cache\CacheEntry {}, "")

    /var/www/nextcloud/lib/private/Files/FileInfo.php - line 371:

    OCA\Files_Sharing\Cache->get("")

    /var/www/nextcloud/lib/private/Files/FileInfo.php - line 218:

    OC\Files\FileInfo->updateEntryfromSubMounts("*** sensiti ... *")

    /var/www/nextcloud/lib/private/Files/Node/Node.php - line 190:

    OC\Files\FileInfo->getMTime()

    /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 160:

    OC\Files\Node\Node->getMTime()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 790:

    OCA\DAV\Connector\Sabre\Node->getLastModified()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php - line 98:

    Sabre\DAV\CorePlugin->Sabre\DAV\{closure}("*** sensiti ... *")

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 794:

    Sabre\DAV\PropFind->handle("{DAV:}getlastmodified", Closure {})

    <<closure>>

    Sabre\DAV\CorePlugin->propFind(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})

    /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

    call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\DAV\ ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1059:

    Sabre\Event\EventEmitter->emit("propFind", [ Sabre\DAV\ ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 981:

    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1666:

    Sabre\DAV\Server->getPropertiesIteratorForPath("files/aaron", [ "{DAV:}getlastmodified"], 0)

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 355:

    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)

    <<closure>>

    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

    /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

    call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:

    Sabre\Event\EventEmitter->emit("method:PROPFIND", [ Sabre\HTTP ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:

    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

    /var/www/nextcloud/apps/dav/lib/Server.php - line 316:

    Sabre\DAV\Server->exec()

    /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

    OCA\DAV\Server->exec()

    /var/www/nextcloud/remote.php - line 163:

    require_once("/var/www/ne ... p")

This exception trace is copied from the nextcloud page /nextcloud/settings/admin/logging and repeats every 10-60 seconds. This might be the case, because user FRIEND has setup a nextcloud desktop client, which tries to reconnect periodically (nextcloud unavailable as mentioned above)

@ManOki ManOki added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Aug 27, 2019
@ManOki
Copy link
Author

ManOki commented Aug 27, 2019

see also #11669 #11545

@ManOki
Copy link
Author

ManOki commented Aug 29, 2019

I did some additional testing:

If the SMB service (i.e. smbd.service) on machine NAS is just shutdown, but the machine is reachable, the error message is not shown. User FRIEND is able to see his files, but there is no empty directory for the offline share. The share is still visible inside the shareoverview.
If the SMB share is back online, User FRIEND is not able to see the share again until User ME signs into his nextcloud account.

@ManOki
Copy link
Author

ManOki commented Jul 21, 2020

still not working for NC 19.0.1

@ManOki ManOki changed the title root directory unvailable, if share on external storage is offline on 16.0.4 root directory unvailable, if share on external storage is offline Jul 21, 2020
@szaimen
Copy link
Contributor

szaimen commented Jun 8, 2021

Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :)

@ManOki
Copy link
Author

ManOki commented Jun 8, 2021

Fixed. Now user ME sees all files and no initial error message. If the share is accessed, there is an popup "Storage is temporarily not available".

@ManOki ManOki closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage needs info
Projects
None yet
Development

No branches or pull requests

3 participants