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

[Bug]: smb/cifs file sharing is not working #38299

Closed
6 of 9 tasks
tonyblue2 opened this issue May 16, 2023 · 6 comments
Closed
6 of 9 tasks

[Bug]: smb/cifs file sharing is not working #38299

tonyblue2 opened this issue May 16, 2023 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 26-feedback bug feature: external storage feature: sharing

Comments

@tonyblue2
Copy link

tonyblue2 commented May 16, 2023

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

My data directory "/" is integrated as external storage smb/cifs. "Log-in credentials save in database" is selected for authentication. The files can be accessed.
Unfortunately, the release of data to other users or via a link does not work.

Steps to reproduce

  1. Mount external smb/cifs storage as "/". Select "Log-in credentials save in database" for authentication.
  2. Create a new file in the file directory.
  3. Share this file as a link or share this file with other users.
  4. A message appears that the share has been created.
  5. However, the release does not work. Furthermore, the shared file is not

Expected behavior

I expect a working link or user file sharing

Installation method

Official All-in-One appliance

Nextcloud Server version

26

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

sudo -u www-data php occ config:list system
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "26.0.1.1",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "trusted_domains": [
            "localhost",
            "firstcloud.ddnss.de",
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "log_type": "file",
        "loglevel": 2,
        "logtimezone": "Europe\/Berlin",
        "logfile": "\/var\/www\/nextcloud\/data\/nextcloud.log",
        "syslog_tag": "Nextcloud",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": 30,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "updatechecker": false,
        "overwrite.cli.url": "http:\/\/firstcloud.ddnss.de",
        "debug": false,
        "enabledPreviewProviders": {
            "0": "OC\\Preview\\PNG",
            "1": "OC\\Preview\\JPEG",
            "2": "OC\\Preview\\GIF",
            "11": "OC\\Preview\\Illustrator",
            "12": "OC\\Preview\\Postscript",
            "13": "OC\\Preview\\Photoshop",
            "14": "OC\\Preview\\TIFF"
        },
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "default_language": "de",
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "calendar",
            "documents",
            "joplin",
            "ocdownloader",
            "unsplash",
            "imageconverter",
            "richdocumentscode"
        ],
        "has_rebuilt_cache": true,
        "default_phone_region": "DE",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 1800,
        "session_keepalive": false,
        "auto_logout": true
    }
}

List of activated Apps

sudo -u www-data php occ app:list
Enabled:
  - activity: 2.18.0
  - admin_audit: 1.16.0
  - bruteforcesettings: 2.6.0
  - calendar: 4.3.3
  - circles: 26.0.0
  - cloud_federation_api: 1.9.0
  - comments: 1.16.0
  - contacts: 5.2.0
  - dashboard: 7.6.0
  - dav: 1.25.0
  - deck: 1.9.2
  - federatedfilesharing: 1.16.0
  - federation: 1.16.0
  - files: 1.21.1
  - files_external: 1.18.0
  - files_pdfviewer: 2.7.0
  - files_rightclick: 1.5.0
  - files_sharing: 1.18.0
  - files_trashbin: 1.16.0
  - files_versions: 1.19.1
  - firstrunwizard: 2.15.0
  - imageconverter: 1.3.5
  - logreader: 2.11.0
  - lookup_server_connector: 1.14.0
  - mail: 3.1.1
  - maps: 1.0.2
  - nextcloud_announcements: 1.15.0
  - notes: 4.7.2
  - notifications: 2.14.0
  - oauth2: 1.14.0
  - ocdownloader: 1.9.1
  - password_policy: 1.16.0
  - phonetrack: 0.7.6
  - photos: 2.2.0
  - privacy: 1.10.0
  - provisioning_api: 1.16.0
  - recommendations: 1.5.0
  - related_resources: 1.1.0-alpha1
  - richdocuments: 8.0.1
  - richdocumentscode: 22.5.1301
  - serverinfo: 1.16.0
  - settings: 1.8.0
  - sharebymail: 1.16.0
  - spreed: 16.0.3
  - support: 1.9.0
  - survey_client: 1.14.0
  - suspicious_login: 4.4.0
  - systemtags: 1.16.0
  - tasks: 0.14.5
  - text: 3.7.2
  - theming: 2.1.1
  - twofactor_backupcodes: 1.15.0
  - twofactor_totp: 8.0.0-alpha.0
  - unsplash: 2.2.0
  - updatenotification: 1.16.0
  - user_status: 1.6.0
  - viewer: 1.10.0
  - weather_status: 1.6.0
  - workflowengine: 2.8.0
Disabled:
  - carnet: 0.24.6 (installed 0.24.6)
  - contactsinteraction: 1.7.0 (installed 1.6.0)
  - encryption: 2.14.0
  - groupfolders: 14.0.2 (installed 14.0.2)
  - user_ldap: 1.16.0
  - workflow_ocr: 1.26.1 (installed 1.26.1)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

[no app in context] Warnung: OCP\Files\StorageNotAvailableException: File by id 538516 not found at <<closure>>

 0. /var/www/html/lib/private/Files/Storage/Wrapper/Jail.php line 341
    OC\Files\Storage\FailedStorage->free_space()
 1. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 331
    OC\Files\Storage\Wrapper\Jail->free_space()
 2. /var/www/html/lib/private/legacy/OC_Helper.php line 525
    OC\Files\Storage\Wrapper\Wrapper->free_space()
 3. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 336
    OC_Helper::getStorageInfo()
 4. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 770
    OCA\DAV\Connector\Sabre\Directory->getQuotaInfo()
 5. /var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php line 95
    Sabre\DAV\CorePlugin->Sabre\DAV\{closure}("*** sensitive parameters replaced ***")
 6. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 774
    Sabre\DAV\PropFind->handle()
 7. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->propFind()
 8. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1052
    Sabre\DAV\Server->emit()
 9. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 984
    Sabre\DAV\Server->getPropertiesByNode()
10. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1662
    Sabre\DAV\Server->getPropertiesIteratorForPath()
11. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1647
    Sabre\DAV\Server->writeMultiStatus()
12. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 346
    Sabre\DAV\Server->generateMultiStatus()
13. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPropFind()
14. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
15. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
16. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
17. /var/www/html/apps/dav/lib/Server.php line 366
    Sabre\DAV\Server->exec()
18. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
19. /var/www/html/remote.php line 172
    require_once("/var/www/html/a ... p")

Caused by:

OCP\Files\NotFoundException: File by id 538516 not found at <<closure>>

 0. /var/www/html/apps/files_sharing/lib/SharedStorage.php line 532
    OCA\Files_Sharing\SharedStorage->init()
 1. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 494
    OCA\Files_Sharing\SharedStorage->getWrapperStorage()
 2. /var/www/html/apps/files_sharing/lib/SharedStorage.php line 201
    OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage()
 3. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 494
    OCA\Files_Sharing\SharedStorage->instanceOfStorage()
 4. /var/www/html/lib/private/legacy/OC_Helper.php line 520
    OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage()
 5. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 336
    OC_Helper::getStorageInfo()
 6. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 770
    OCA\DAV\Connector\Sabre\Directory->getQuotaInfo()
 7. /var/www/html/3rdparty/sabre/dav/lib/DAV/PropFind.php line 95
    Sabre\DAV\CorePlugin->Sabre\DAV\{closure}("*** sensitive parameters replaced ***")
 8. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 774
    Sabre\DAV\PropFind->handle()
 9. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->propFind()
10. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1052
    Sabre\DAV\Server->emit()
11. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 984
    Sabre\DAV\Server->getPropertiesByNode()
12. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1662
    Sabre\DAV\Server->getPropertiesIteratorForPath()
13. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1647
    Sabre\DAV\Server->writeMultiStatus()
14. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 346
    Sabre\DAV\Server->generateMultiStatus()
15. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPropFind()
16. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
18. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
19. /var/www/html/apps/dav/lib/Server.php line 366
    Sabre\DAV\Server->exec()
20. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
21. /var/www/html/remote.php line 172
    require_once("/var/www/html/a ... p")

PROPFIND /remote.php/dav/files/myuser/
from 188.193.128.12 by myuser at 2023-05-16T07:13:07+02:00

Additional info

No response

@tonyblue2 tonyblue2 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 16, 2023
@tonyblue2
Copy link
Author

Today i installed 26.0.2 - now it runs.

@joshtrichards
Copy link
Member

This may have been similar to #37473 and a fix made it's way into v26.0.2 by way of #38317.

Glad to hear it's working!

@kborgulski

This comment was marked as off-topic.

@joshtrichards

This comment was marked as off-topic.

@joshtrichards
Copy link
Member

@tonyblue2 Actually this is expected behavior when using "Log-in credentials, save in session"

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/auth_mechanisms.html#password-based-mechanisms

You'll need to use a different credential option as described.

This is behaving as designed - with your current configuration - since your SMB credentials are only available to NC while you're logged in.

@tonyblue2
Copy link
Author

@tonyblue2 Actually this is expected behavior when using "Log-in credentials, save in session"

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/auth_mechanisms.html#password-based-mechanisms

You'll need to use a different credential option as described.

Thanks for the hint. My description above was wrong. I got it right However, the error no longer occurs for me (as described).

I used "Log-in credentials, save in database " for authentication.

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 26-feedback bug feature: external storage feature: sharing
Projects
None yet
Development

No branches or pull requests

4 participants