share from SMB can't be opened
Steps to reproduce
- UserA share a folder from a external SMB storage to a User (ex. UserB)
- log on as UserB, you won't see the shared folder.
- In the "Shares" overview you will see the shared folder, when you try to open it, you will get a error message "The operation is forbidden"
Expected behaviour
Obviously to see the content of the shared folder
Actual behaviour
Can't see shared folder and content
Note
This happened after the upgrade from 15.0.X to 16.0.X
Server configuration
Operating system: Ubuntu 18.04.2 LTS Web server: Apache/2.4.29 (Ubuntu) Database: MySQL 5.7.26 PHP version: 7.2.17 Nextcloud version: (see Nextcloud admin page) 16.0.1 Updated from an older Nextcloud/ownCloud or fresh install: 16.0.0 Where did you install Nextcloud from: nextcloud.com Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- accessibility: 1.2.0
- activity: 2.9.1
- admin_audit: 1.6.0
- announcementcenter: 3.5.1
- bruteforcesettings: 1.3.0
- cloud_federation_api: 0.2.0
- comments: 1.6.0
- data_request: 1.3.0
- dav: 1.9.2
- drawio: 0.9.3
- federatedfilesharing: 1.6.0
- federation: 1.6.0
- files: 1.11.0
- files_antivirus: 2.1.0
- files_external: 1.7.0
- files_pdfviewer: 1.5.0
- files_rightclick: 0.13.0
- 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
- firstrunwizard: 2.5.0
- gallery: 18.3.0
- logreader: 2.1.0
- lookup_server_connector: 1.4.0
- metadata: 0.9.0
- nextcloud_announcements: 1.5.0
- notifications: 2.4.1
- oauth2: 1.4.2
- password_policy: 1.6.0
- piwik: 0.5.2
- provisioning_api: 1.6.0
- ransomware_protection: 1.4.0
- richdocuments: 3.3.3
- serverinfo: 1.6.0
- sharebymail: 1.6.0
- smb_test: 0.2.2
- systemtags: 1.6.0
- terms_of_service: 1.2.0
- twofactor_backupcodes: 1.5.0
- updatenotification: 1.6.0
- user_ldap: 1.6.0
- viewer: 1.0.0
- workflowengine: 1.6.0
Disabled:
- encryption
- files_accesscontrol
- files_automatedtagging
- files_retention
- privacy
- support
- survey_client
- theming
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "16.0.1.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "Europe\/Berlin",
"installed": true,
"ldapIgnoreNamingRules": false,
"ldapUserCleanupInterval": 51,
"theme": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2,
"logfile": "\/opt\/ocdata\/log\/nextcloud.log",
"updatechecker": true,
"log_rotate_size": 10485760,
"log_rotate_sizerotation": 52428800,
"appcodechecker": false,
"enable_avatars": true,
"mail_smtpmode": "sendmail",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"forcessl": true,
"mail_smtpsecure": "tls",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"forceSSLforSubdomains": true,
"knowledgebaseenabled": false,
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0
},
"trashbin_retention_obligation": "auto",
"updater.release.channel": "stable",
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"mail_smtpauthtype": "LOGIN",
"mysql.utf8mb4": true,
"updater.secret": "***REMOVED SENSITIVE VALUE***"
}
}
Are you using external storage, if yes which one: local/smb/sftp/... SMB Are you using encryption: yes/no No Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... LDAP
LDAP configuration (delete this part if not used)
LDAP config
***REMOVED SENSITIVE VALUE***
Client configuration
Browser: Firefox/Chrome Operating system: Windows 10
Logs
Web server error log
Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Nextcloud log
I get this error
{
"reqId": "XN6eILrguMqOUMyHaW7ZgAAAAAk",
"level": 4,
"time": "2019-05-17T13:42:24+02:00",
"remoteAddr": "192.168.1.1",
"user": "JaneDoe",
"app": "webdav",
"method": "PROPFIND",
"url": "/remote.php/dav/files/JaneDoe/muvpn",
"message": {
"Exception": "OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden",
"Message": "No read permissions",
"Code": 0,
"Trace": [
{
"file": "/var/www/nexcloud/apps/dav/lib/Connector/Sabre/TagsPlugin.php",
"line": 224,
"function": "getChildren",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": []
},
{
"function": "handleGetProperties",
"class": "OCA\\DAV\\Connector\\Sabre\\TagsPlugin",
"type": "->",
"args": [
{
"__class__": "Sabre\\DAV\\PropFind"
},
{
"__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
}
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "OCA\\DAV\\Connector\\Sabre\\TagsPlugin"
},
"handleGetProperties"
],
[
{
"__class__": "Sabre\\DAV\\PropFind"
},
{
"__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
}
]
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1059,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"propFind",
[
{
"__class__": "Sabre\\DAV\\PropFind"
},
{
"__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
}
]
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 981,
"function": "getPropertiesByNode",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Sabre\\DAV\\PropFind"
},
{
"__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
}
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1666,
"function": "getPropertiesIteratorForPath",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"files/JaneDoe/muvpn",
[
"{DAV:}getlastmodified",
"{DAV:}getetag",
"{DAV:}getcontenttype",
"{DAV:}resourcetype",
"{http://nexcloud.org/ns}fileid",
"{http://nexcloud.org/ns}permissions",
"{http://nexcloud.org/ns}size",
"{DAV:}getcontentlength",
"{http://nextcloud.org/ns}has-preview",
"{http://nextcloud.org/ns}mount-type",
"{http://nextcloud.org/ns}is-encrypted",
"{http://open-collaboration-services.org/ns}share-permissions",
"{http://nexcloud.org/ns}tags",
"{http://nexcloud.org/ns}favorite",
"{http://nexcloud.org/ns}comments-unread",
"{http://nexcloud.org/ns}owner-id",
"{http://nexcloud.org/ns}owner-display-name",
"{http://nexcloud.org/ns}share-types"
],
1
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 355,
"function": "generateMultiStatus",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Generator"
},
false
]
},
{
"function": "httpPropFind",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/muvpn",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "Sabre\\DAV\\CorePlugin"
},
"httpPropFind"
],
[
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/muvpn",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 479,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"method:PROPFIND",
[
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/muvpn",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 254,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/muvpn",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nexcloud/apps/dav/lib/Server.php",
"line": 316,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nexcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nexcloud/remote.php",
"line": 163,
"args": [
"/var/www/nexcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nexcloud/apps/dav/lib/Connector/Sabre/Directory.php",
"Line": 263,
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36",
"version": "16.0.1.1",
"id": "5cdea381286c6"
}
{
"reqId": "XN6THEMM--GDQRS5fHfwHAAAAD8",
"level": 4,
"time": "2019-05-17T12:55:24+02:00",
"remoteAddr": "192.168.1.1",
"user": "JaneDoe",
"app": "webdav",
"method": "PROPFIND",
"url": "/remote.php/dav/files/JaneDoe/Jeopardy%20Startbild",
"message": {
"Exception": "Sabre\\DAV\\Exception\\ServiceUnavailable",
"Message": "File with id \"5590322\" has not been found.",
"Code": 0,
"Trace": [
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 76,
"function": "getChild",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"Jeopardy Startbild"
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 967,
"function": "getNodeForPath",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/JaneDoe/Jeopardy Startbild"
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1666,
"function": "getPropertiesIteratorForPath",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"files/JaneDoe/Jeopardy Startbild",
[
"{DAV:}getlastmodified",
"{DAV:}getetag",
"{DAV:}getcontenttype",
"{DAV:}resourcetype",
"{http://nexcloud.org/ns}fileid",
"{http://nexcloud.org/ns}permissions",
"{http://nexcloud.org/ns}size",
"{DAV:}getcontentlength",
"{http://nextcloud.org/ns}has-preview",
"{http://nextcloud.org/ns}mount-type",
"{http://nextcloud.org/ns}is-encrypted",
"{http://open-collaboration-services.org/ns}share-permissions",
"{http://nexcloud.org/ns}tags",
"{http://nexcloud.org/ns}favorite",
"{http://nexcloud.org/ns}comments-unread",
"{http://nexcloud.org/ns}owner-id",
"{http://nexcloud.org/ns}owner-display-name",
"{http://nexcloud.org/ns}share-types"
],
1
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 355,
"function": "generateMultiStatus",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Generator"
},
false
]
},
{
"function": "httpPropFind",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/Jeopardy%20Startbild",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "Sabre\\DAV\\CorePlugin"
},
"httpPropFind"
],
[
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/Jeopardy%20Startbild",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 479,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"method:PROPFIND",
[
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/Jeopardy%20Startbild",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nexcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 254,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"absoluteUrl": "https://cloud.example.com/remote.php/dav/files/JaneDoe/Jeopardy%20Startbild",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nexcloud/apps/dav/lib/Server.php",
"line": 316,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nexcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nexcloud/remote.php",
"line": 163,
"args": [
"/var/www/nexcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nexcloud/apps/dav/lib/Connector/Sabre/Directory.php",
"Line": 225,
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36",
"version": "16.0.1.1",
"id": "5cdea38128bb6"
}
For me, this bug applies to local external storage too. So I assume, this is nothing specific to SMB.
I digged into this a bit and it seems to be related to replacement of the $user variable.
If I enable an external share /External as /srv/bindfs/$user for a user group, the error occurs for files within this share.
If the share is written directly as e.g. /srv/bindfs/halms, there is no error.
A call of occ files_external:verify IDalso shows the following for a config that includes $user:
- status: unknown
- code: 3
- message: Mount configuration incomplete
It seems there is some bug with the replacement of $user in the files_external of Nextcloud 16.
The interesting thing is, that regular access to the external mount is still possible - the error only shows in some parts.
It seems that #15934 covers a very similar issue. #15567 is probably somewhat related as well.
Stack trace from the initial post does not look related.
I assume that there is an error down the road in the sharing functionality caused by the fact that the replacement of $user does not fully work right now.
All these issues are probably caused by the rewrite of the placeholder substitution code.
@trockenasche need you input :ping_pong:
unfortunately, I can't get more information at the moment. I will provide more details probably at Monday.
I thought I have solved it buy I'm still experiencing this issue, same as #15934 Should I open another issue or can we work here?
Ref https://github.com/nextcloud/server/pull/16525
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.