File not found for shared files using the $user variable
Steps to reproduce
- Mount external storage smb folder (Global credentials/Username+Password/Log-In credentials in DB) using the $user variable in the share path
- Create a share link for a file within this folder
- Open the link from any browser without the sharing users session
- Browser answers File not found
Expected behaviour
The file should be available via URL
Actual behaviour
Browser answers File not found - it works fine if the $user variable is not used within the smb path at [1.]. I guess the shared URL cannot be resolved to the sharing users $user variable Tell us what happens instead
Server configuration
Operating system:: CentOS Linux release 7.6.1810 (Core)
Web server: Apache 2.4.6
Database: MariaDB-server 10.4.5
PHP version: 7.2
Nextcloud version: 16.0.3
Updated from an older Nextcloud/ownCloud or fresh install: Updated from 16.0.1
Where did you install Nextcloud from: ZIP 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
- apporder: 0.7.1
- calendar: 1.7.0
- cloud_federation_api: 0.2.0
- comments: 1.6.0
- contacts: 3.1.3
- dav: 1.9.2
- external: 3.3.0
- federatedfilesharing: 1.6.0
- federation: 1.6.0
- files: 1.11.0
- files_downloadactivity: 1.5.0
- files_external: 1.7.0
- files_markdown: 2.0.6
- files_pdfviewer: 1.5.0
- files_rightclick: 0.13.0
- files_sharing: 1.8.0
- files_texteditor: 2.8.0
- files_trackdownloads: 1.5.0
- files_trashbin: 1.6.0
- files_versions: 1.9.0
- files_videoplayer: 1.5.0
- gallery: 18.3.0
- groupfolders: 4.0.3
- guests: 1.1.0
- logreader: 2.1.0
- lookup_server_connector: 1.4.0
- notes: 3.0.0
- notifications: 2.4.1
- oauth2: 1.4.2
- onlyoffice: 2.4.0
- password_policy: 1.6.0
- privacy: 1.0.0
- provisioning_api: 1.6.0
- qownnotesapi: 19.4.0
- serverinfo: 1.6.0
- sharebymail: 1.6.0
- sharerenamer: 2.6.0
- spreed: 6.0.2
- systemtags: 1.6.0
- terms_of_service: 1.2.2
- theming: 1.7.0
- theming_customcss: 1.3.0
- twofactor_admin: 0.4.0
- twofactor_backupcodes: 1.5.0
- twofactor_totp: 2.1.2
- updatenotification: 1.6.0
- user_ldap: 1.6.0
- viewer: 1.0.0
- workflowengine: 1.6.0
Disabled:
- bruteforcesettings
- encryption
- firstrunwizard
- nextcloud_announcements
- recommendations
- support
- survey_client
Nextcloud configuration:
Config report
bash-4.2$ php occ config:list system
{
"system": {
"trusted_domains": [
"cloud.example.com",
"vm033.test.example.com",
"vm034.test.example.com"
],
"dbtype": "mysql",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "3306",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"proxy": "http:\/\/www-proxy.rz.example.com:80\/",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"password": "***REMOVED SENSITIVE VALUE***",
"timeout": 3
},
"knowledgebaseenabled": false,
"version": "16.0.3.0",
"installed": true,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"maintenance": false,
"updater.secret": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"loglevel": 0
}
}
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: ActiveDirectory
LDAP configuration (delete this part if not used)
LDAP config
bash-4.2$ php occ ldap:show-config
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration | s01 |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport | 0 |
| homeFolderNamingRule | attr:sAMAccountName |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | CN=adcloud,CN=Users,DC=example,DC=com |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | ldaps://uk-s1.example.com |
| ldapBackupPort | 636 |
| ldapBase | OU=rz,OU=einrichtungen,DC=example,DC=com |
| ldapBaseGroups | OU=groups,OU=rz,OU=einrichtungen,DC=example,DC=com |
| ldapBaseUsers | OU=rz_managed,OU=user,OU=rz,OU=einrichtungen,DC=example,DC=com |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDefaultPPolicyDN | |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 1 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | sAMAccountName |
| ldapExtStorageHomeAttribute | sAMAccountName |
| ldapGidNumber | gidNumber |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | (&(objectClass=group)) |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | member |
| ldapHost | ldaps://uk-s2.example.com |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(memberof:1.2.840.113556.1.4.1941:=CN=rz_mitarbeiter,OU=groups,OU=rz,OU=einrichtungen,DC=example,DC=com)(sAMAccountName=%uid)) |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 0 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 1 |
| ldapOverrideMainServer | |
| ldapPagingSize | 1000 |
| ldapPort | 636 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserAvatarRule | default |
| ldapUserDisplayName | displayname |
| ldapUserDisplayName2 | samaccountname |
| ldapUserFilter | (&(memberof:1.2.840.113556.1.4.1941:=CN=rz_mitarbeiter,OU=groups,OU=rz,OU=einrichtungen,DC=example,DC=com)) |
| ldapUserFilterGroups | |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| turnOnPasswordChange | 0 |
| useMemberOfToDetectMembership | 1 |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
Client configuration
Browser: Google Chrome Version 75.0.3770.100 (Official Build) (64-bit)
Operating system: Archlinux
Logs
Web server access log
Web server access log
[10/Jul/2019:16:32:27 +0200] 123.123.123.123 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /index.php/s/jfkEB53Q5qZsetK HTTP/1.1" 12413
123.123.123.123 - - [10/Jul/2019:16:32:27 +0200] "GET /index.php/s/jfkEB53Q5qZsetK HTTP/1.1" 404 12413
Nextcloud log (data/nextcloud.log)
Nextcloud log
nothing when accessing the share link even with loglevel debug
Same issue reported in #15599 and #15934, both unsolved.
Ref https://github.com/nextcloud/server/pull/16525
I tested the version 16.0.4 RC1, the fix seems to work fine, thanks. Looking forward for the stable release
Tried the 16.0.4 release today, seems to work fine as well. Thanks for the fix!