Skip to content

Share file from ext storage from LDAP user to regular user, doesn't appear #22467

Closed

Description

@PVince81

Steps to reproduce

  1. Setup LDAP
  2. Setup a SFTP external storage "/sftp"
  3. Create a file "/sftp/test.txt"
  4. Login as LDAP user
  5. Share "/sftp/test.txt" with the local admin
  6. Login as admin
  7. Check if "test.txt" appears

Expected behaviour

"test.txt" must be visible

Actual behaviour

"test.txt not visible"

Version

ownCloud 9.0 git master 7b0f83b

Logs

{"reqId":"Or1fgaw0tn4oF3GlYh91","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:44+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/"}
{"reqId":"Or1fgaw0tn4oF3GlYh91","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:44+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/"}
{"reqId":"eqy29XkcrWkfpFWV4Ahk","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:44+00:00","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=6954bd568d2f0d10c4f6a8d8da5d9c6d"}
{"reqId":"eqy29XkcrWkfpFWV4Ahk","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:44+00:00","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=6954bd568d2f0d10c4f6a8d8da5d9c6d"}
{"reqId":"ecpj+SE\/a\/X3IDmfdhUD","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:45+00:00","method":"GET","url":"\/owncloud\/cron.php"}
{"reqId":"ecpj+SE\/a\/X3IDmfdhUD","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:45+00:00","method":"GET","url":"\/owncloud\/cron.php"}
{"reqId":"Qv5hersvX7FQyEbXRnYZ","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:45+00:00","method":"GET","url":"\/owncloud\/ocs\/v2.php\/apps\/notifications\/api\/v1\/notifications?format=json"}
{"reqId":"Qv5hersvX7FQyEbXRnYZ","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:45+00:00","method":"GET","url":"\/owncloud\/ocs\/v2.php\/apps\/notifications\/api\/v1\/notifications?format=json"}
{"reqId":"8vDkxFfMVUZHOQd1wqjq","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:45+00:00","method":"GET","url":"\/owncloud\/index.php\/avatar\/root\/28"}
{"reqId":"8vDkxFfMVUZHOQd1wqjq","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:45+00:00","method":"GET","url":"\/owncloud\/index.php\/avatar\/root\/28"}
{"reqId":"cBTW4V2b+b9ZpX2jOqlG","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/"}
{"reqId":"cBTW4V2b+b9ZpX2jOqlG","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/"}
{"reqId":"JfKgvENdzSuOBirAvoHw","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/index.php\/avatar\/root\/28"}
{"reqId":"JfKgvENdzSuOBirAvoHw","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/index.php\/avatar\/root\/28"}
{"reqId":"7dtbgfZg0FA5c91TMH6Q","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/ocs\/v1.php\/apps\/files_external\/api\/v1\/mounts?format=json"}
{"reqId":"7dtbgfZg0FA5c91TMH6Q","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/ocs\/v1.php\/apps\/files_external\/api\/v1\/mounts?format=json"}
{"reqId":"W+rtpgJI0CtXM+YUukps","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?subfiles=true&path=%2F&format=json"}
{"reqId":"W+rtpgJI0CtXM+YUukps","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?subfiles=true&path=%2F&format=json"}
{"reqId":"+VUUu9SuANuu533IK11O","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2F"}
{"reqId":"+VUUu9SuANuu533IK11O","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2F"}
{"reqId":"4nWmWjwIk3dbtp7sLEJJ","remoteAddr":"127.0.0.1","app":"files","message":" Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files_external\/userglobalstorages\/1"}
{"reqId":"4nWmWjwIk3dbtp7sLEJJ","remoteAddr":"127.0.0.1","app":"core","message":"Backends provided no user object for 0868ad0a-69b1-1035-907c-63e3f77fca33","level":3,"time":"2016-02-17T12:42:46+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files_external\/userglobalstorages\/1"}

Note: also happens if you limit the applicables to the LDAP user.

That LDAP id is from the sharing LDAP user:

*************************** 1. row ***************************
       ldap_dn: uid=zombie0,ou=zombies,dc=owncloud,dc=com
 owncloud_name: 0868ad0a-69b1-1035-907c-63e3f77fca33
directory_uuid: 0868ad0a-69b1-1035-907c-63e3f77fca33

@davitol @icewind1991 @rullzer @blizzz

I suspect an issue with initializing received share mounts.
Could also be an issue where the wrong user id format is used when passed to the user manager ?

@davitol please confirm whether this is a regression from v8.2.2

Activity

  1. added this to the milestone on Feb 17, 2016
  2. davitol commented on Feb 17, 2016

    @davitol
    Contributor

    @PVince81 Yes, it works in oC 8.2.2 (stable)

  3. rullzer commented on Feb 17, 2016

    @rullzer
    Contributor

    Yes seems like a UID mapping thing... let me look into this now that LDAP is up and running...

  4. self-assigned this
    on Feb 17, 2016
  5. rullzer commented on Feb 17, 2016

    @rullzer
    Contributor

    @PVince81 something weird is happening... I can actually see the share in cadavar... but not in the web UI...

  6. PVince81 commented on Feb 17, 2016

    @PVince81
    ContributorAuthor

    But they both use Webdav now on master ?!

  7. rullzer commented on Feb 17, 2016

    @rullzer
    Contributor

    yes...

  8. rullzer commented on Feb 17, 2016

    @rullzer
    Contributor

    Ok I think I found out why this happens. Basically it is the avatar code at fault. But other stuff happens as well..

    When the webUI authenticates by session in the ldap setup we request the avatar manager. And the avatar manager needs the rootFolder. This tries to setup the whole fs. Since we know the user it tries to do this for the user as well. However at this point the ldap backend is not yet registered (since we are constructing that). So the incomming share fails since we can't find the user.

    Now when the ldap backend is registered the fs is already setup for this user and thus the share is still invalid.

  9. rullzer commented on Feb 17, 2016

    @rullzer
    Contributor

    @icewind1991 basically getRootFolder setups the fs for the currently logged in user. I would assume that would happen in getUserFolder actually.

  10. added a commit that references this issue on Feb 18, 2016
    d727fb1
  11. rullzer commented on Feb 18, 2016

    @rullzer
    Contributor

    PR in #22493 .. let see.

  12. added a commit that references this issue on Feb 18, 2016
    7abb869
  13. lock commented on Aug 6, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  14. locked as resolved and limited conversation to collaborators on Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions