server
                                
                                 server copied to clipboard
                                
                                    server copied to clipboard
                            
                            
                            
                        [Bug]: External storage SMB/CIFS Cannot upload files
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] 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.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
External storage SMB/CIFS root directory can upload files & create folder. The subfolders can create folder, but cannot upload files
Steps to reproduce
- Share folders on Windows 2022
- Add this share in external storage smb/cifs, and succeed
- Uploading files and creating folders are successful
- But when you enter a subfolder, uploading the file again fails
Expected behavior
Files can be uploaded in subfolders
Installation method
None
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
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
{
    "system": {
        "debug": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "192.168.*",
            "*cymmetrik*",
            "github**"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.3.2",
        "overwrite.cli.url": "https:\/\/fedcloud.cymmetrik.com\/",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice7.3",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Image",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Font",
            "OC\\Preview\\MP3",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI",
            "OC\\Preview\\Illustrator"
        ],
        "default_phone_region": "CN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "allow_local_remote_servers": true,
        "app_install_overwrite": [
            "pdfannotate",
            "customproperties"
        ]
    }
}
List of activated Apps
Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - approval: 1.0.12
  - bruteforcesettings: 2.4.0
  - calendar: 3.4.2
  - circles: 24.0.0
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.0
  - contactsinteraction: 1.5.0
  - customproperties: 2.0.4
  - dashboard: 7.4.0
  - dav: 1.22.0
  - external: 4.0.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_accesscontrol: 1.14.1
  - files_automatedtagging: 1.14.1
  - files_downloadlimit: 1.0.1
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_scripts: 2.0.3
  - files_sharing: 1.16.2
  - files_staticmimecontrol: 1.1.0
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - flow_notifications: 1.4.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - mail: 1.13.7
  - nextcloud_announcements: 1.13.0
  - notestutorial: 20.0.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - onlyoffice: 7.5.4
  - password_policy: 1.14.0
  - pdfannotate: 0.0.10
  - photos: 1.6.0
  - previewgenerator: 5.0.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - seemeapp: 0.0.1
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - spreed: 14.0.3
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - encryption
  - files_external: 1.16.1
  - firstrunwizard: 2.13.0
  - user_ldap
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"YuScFm8PvzGDMDgtIqJmtAAAABU","level":2,"time":"2022-07-30T02:48:54+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"/","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"","data":[]}
{"reqId":"YuScFm8PvzGDMDgtIqJmtAAAABU","level":2,"time":"2022-07-30T02:48:54+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"/","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"","data":[]}
{"reqId":"YuScPdoHPx0Vav7le-1bhwAAAIw","level":2,"time":"2022-07-30T02:49:33+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"/","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"","data":[]}
{"reqId":"YuScPdoHPx0Vav7le-1bhwAAAIw","level":2,"time":"2022-07-30T02:49:33+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"/","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"","data":[]}
{"reqId":"YuSdd-GD@Z2FhS-CaNhiSgAAAMI","level":2,"time":"2022-07-30T02:54:47+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"","data":[]}
{"reqId":"YuSdd-GD@Z2FhS-CaNhiSgAAAMI","level":2,"time":"2022-07-30T02:54:47+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Host localhost was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"","data":[]}
{"reqId":"YuSdtNoHPx0Vav7le-1bjgAAAIs","level":3,"time":"2022-07-30T02:56:45+00:00","remoteAddr":"127.0.0.1","user":"admin","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":"Allowed memory size of 134217728 bytes exhausted (tried to allocate 255578688 bytes) at /var/www/seacloud/lib/private/Installer.php#300","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","data":{"app":"PHP"}}
{"reqId":"YuSeBEtESFD431SKEqqnHwAAAEk","level":3,"time":"2022-07-30T02:59:08+00:00","remoteAddr":"127.0.0.1","user":"admin","app":"settings","method":"POST","url":"/index.php/settings/apps/enable","message":"could not enable apps","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 120000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://github.com/nextcloud-releases/richdocuments/releases/download/v6.1.1/richdocuments-v6.1.1.tar.gz","Code":0,"Trace":[{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/seacloud/lib/private/Http/Client/DnsPinMiddleware.php","line":146,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/seacloud/lib/private/Http/Client/Client.php","line":218,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/seacloud/lib/private/Installer.php","line":296,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/seacloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"downloadApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/seacloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/seacloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/seacloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/seacloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/seacloud/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/seacloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/seacloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"could not enable apps","exception":{},"CustomMessage":"could not enable apps"}}
{"reqId":"YuUF6khDne-04dC77QUMGgAAAEw","level":2,"time":"2022-07-30T10:20:26+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"/","message":"Trusted domain error. \"127.0.0.1\" tried to access using \"www.fedcloud.com\" as host.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","data":{"app":"core"}}
{"reqId":"YuUF6uQQSMTVeqJSDB7aQgAAAI0","level":2,"time":"2022-07-30T10:20:26+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"/seacloud","message":"Trusted domain error. \"127.0.0.1\" tried to access using \"www.fedcloud.com\" as host.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","data":{"app":"core"}}
{"reqId":"YuUF60hDne-04dC77QUMHgAAAFI","level":2,"time":"2022-07-30T10:20:27+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=86b67cd6-0","message":"Trusted domain error. \"127.0.0.1\" tried to access using \"www.fedcloud.com\" as host.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","data":{"app":"core"}}
{"reqId":"YuUF7DICaNBUYq6KKBeYXgAAAAc","level":2,"time":"2022-07-30T10:20:28+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"/cron.php","message":"Trusted domain error. \"127.0.0.1\" tried to access using \"www.fedcloud.com\" as host.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","data":{"app":"core"}}
{"reqId":"YuULOeiEA8JkxeM2oUiFoQAAAEs","level":2,"time":"2022-07-30T10:43:06+00:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"POST","url":"/index.php/login","message":"Login failed: admin (Remote IP: 127.0.0.1)","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36","version":"24.0.3.2","data":[]}
Additional info
[PHP] 错误: Error: Couldn't get xattr for smb://192.168.1.118/FedStore/abc/45/46546456: unknown error (2) at /var/www/seacloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php#349 at <
- <> OC\Log\ErrorHandler::onAll() 
- /var/www/seacloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php line 349 smbclient_getxattr()
- /var/www/seacloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php line 305 Icewind\SMB\Native\NativeState->getxattr()
- /var/www/seacloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php line 43 Icewind\SMB\Native\NativeShare->getAttribute()
- /var/www/seacloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php line 69 Icewind\SMB\Native\NativeFileInfo->stat()
- /var/www/seacloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php line 114 Icewind\SMB\Native\NativeFileInfo->getSize()
- /var/www/seacloud/apps/files_external/lib/Lib/Storage/SMB.php line 193 Icewind\SMB\Native\NativeShare->stat()
- /var/www/seacloud/apps/files_external/lib/Lib/Storage/SMB.php line 668 OCA\Files_External\Lib\Storage\SMB->getFileInfo()
- /var/www/seacloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 227 OCA\Files_External\Lib\Storage\SMB->file_exists()
- /var/www/seacloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 227 OC\Files\Storage\Wrapper\Wrapper->file_exists()
- /var/www/seacloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 227 OC\Files\Storage\Wrapper\Wrapper->file_exists()
- /var/www/seacloud/lib/private/Files/View.php line 1177 OC\Files\Storage\Wrapper\Wrapper->file_exists()
- /var/www/seacloud/lib/private/Files/View.php line 552 OC\Files\View->basicOperation()
- /var/www/seacloud/lib/private/Files/Filesystem.php line 595 OC\Files\View->file_exists()
- /var/www/seacloud/apps/files_versions/lib/Storage.php line 187 OC\Files\Filesystem::file_exists()
- /var/www/seacloud/apps/files_versions/lib/Hooks.php line 56 OCA\Files_Versions\Storage::store()
- /var/www/seacloud/lib/private/legacy/OC_Hook.php line 106 OCA\Files_Versions\Hooks::write_hook()
- /var/www/seacloud/lib/private/Files/View.php line 1290 OC_Hook::emit()
- /var/www/seacloud/lib/private/Files/View.php line 1160 OC\Files\View->runHooks()
- /var/www/seacloud/lib/private/Files/View.php line 276 OC\Files\View->basicOperation()
- /var/www/seacloud/apps/dav/lib/Connector/Sabre/Directory.php line 197 OC\Files\View->mkdir()
- /var/www/seacloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1210 OCA\DAV\Connector\Sabre\Directory->createDirectory()
- /var/www/seacloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 560 Sabre\DAV\Server->createCollection()
- /var/www/seacloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89 Sabre\DAV\CorePlugin->httpMkcol()
- /var/www/seacloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472 Sabre\DAV\Server->emit()
- /var/www/seacloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253 Sabre\DAV\Server->invokeMethod()
- /var/www/seacloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321 Sabre\DAV\Server->start()
- /var/www/seacloud/apps/dav/lib/Server.php line 352 Sabre\DAV\Server->exec()
- /var/www/seacloud/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec()
- /var/www/seacloud/remote.php line 166 require_once("/var/www/seaclo ... p")
MKCOL /remote.php/dav/files/admin/ABC/abc/45/46546456 from 127.0.0.1 by admin at 2023-03-08T08:31:28+00:00
Hi, please update to 25.0.7 or better 26.0.2 and report back if it fixes the issue. Thank you!
My goal is to add a label like e.g. 26-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!
If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+
Couldn't get xattr for[..]
I don't believe this is the actual error associated with your problem since this looks like it's coming from an expected error state that we normally suppress any error messages for. None of your other log entries seem relevant.
What, specifically, is the error message your receive in the browser when trying to upload a file into this new folder?
And can you provide the nextcloud.log entry from one of these failing transactions?
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.