Skip to content

[master] Opening user management triggers skeletion copy on every user! #22119

Closed

Description

@DeepDiver1975
[Thu Feb  4 10:35:11 2016] copying skeleton for bazbarfoo from /home/deepdiver/Development/ownCloud/master/core/skeleton to /bazbarfoo/files/
[Thu Feb  4 10:35:12 2016] rewinddir(): 46 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:12 2016] copying skeleton for foobarbaz from /home/deepdiver/Development/ownCloud/master/core/skeleton to /foobarbaz/files/
[Thu Feb  4 10:35:13 2016] rewinddir(): 59 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:13 2016] copying skeleton for notme from /home/deepdiver/Development/ownCloud/master/core/skeleton to /notme/files/
[Thu Feb  4 10:35:14 2016] rewinddir(): 72 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:14 2016] copying skeleton for user0 from /home/deepdiver/Development/ownCloud/master/core/skeleton to /user0/files/
[Thu Feb  4 10:35:15 2016] rewinddir(): 85 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:16 2016] copying skeleton for user01 from /home/deepdiver/Development/ownCloud/master/core/skeleton to /user01/files/
[Thu Feb  4 10:35:17 2016] rewinddir(): 98 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:17 2016] copying skeleton for user02 from /home/deepdiver/Development/ownCloud/master/core/skeleton to /user02/files/
[Thu Feb  4 10:35:18 2016] rewinddir(): 111 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:18 2016] copying skeleton for user_2T55Anbh3MmrX from /home/deepdiver/Development/ownCloud/master/core/skeleton to /user_2T55Anbh3MmrX/files/
[Thu Feb  4 10:35:19 2016] rewinddir(): 124 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31
[Thu Feb  4 10:35:19 2016] copying skeleton for user_kh0xRolXH7Xmt from /home/deepdiver/Development/ownCloud/master/core/skeleton to /user_kh0xRolXH7Xmt/files/
[Thu Feb  4 10:35:20 2016] rewinddir(): 137 is not a valid Directory resource at /home/deepdiver/Development/ownCloud/master/3rdparty/icewind/streams/src/Wrapper.php#31

Activity

  1. added this to the milestone on Feb 4, 2016
  2. PVince81 commented on Feb 4, 2016

    @PVince81
    Contributor

    Ouch. Possible regression ? Let me check 8.2

  3. DeepDiver1975 commented on Feb 4, 2016

    @DeepDiver1975
    ContributorAuthor

    getting the avatar for each user initialized this user's data dir which triggers the skeletion copy

  4. DeepDiver1975 commented on Feb 4, 2016

    @DeepDiver1975
    ContributorAuthor

    bildschirmfoto von 2016-02-04 11-52-30

  5. PVince81 commented on Feb 4, 2016

    @PVince81
    Contributor

    Hmm, then it's possibly older.

    CC @rullzer

  6. PVince81 commented on Feb 4, 2016

    @PVince81
    Contributor

    Maybe the avatar code should not do anything if the user's home was initialized, in which case it can mean that the user don't have an avatar yet. But then, there's LDAP avatars...

  7. PVince81 commented on Feb 12, 2016

    @PVince81
    Contributor

    Setting to high, could impair user management performance.

    @DeepDiver1975 does it only do it once for users created on the CLI or does it do this every time the settings page is opened ? (if every time => high, if only once => medium)

  8. rullzer commented on Feb 12, 2016

    @rullzer
    Contributor

    It basically does this for each 'unitialized' user.

    Avatar code requestst the UserFolder
    When the user folder is requestsed we see if it is there
    For unitisialied users it is not
    We create it and copy the skeleton

    So basically this is happening because the avatar code now is using the node api...

  9. PVince81 commented on Feb 15, 2016

    @PVince81
    Contributor

    And the avatar needs access to the user's filesystem because sometimes the avatar is stored there ?

    Is it possible to first detect whether the user has an avatar in the first place before calling getUserFolder() ? (and goodbye DI for that item)

  10. PVince81 commented on Feb 15, 2016

    @PVince81
    Contributor

    another alternative is to have an option "don't create skeleton" for getUserFolder(), but that sounds a bit far-fetched. @icewind1991

  11. DeepDiver1975 commented on Feb 15, 2016

    @DeepDiver1975
    ContributorAuthor

    The basic question is if the copy skeleton operation is executed in the correct location?

    Generally speaking my expectation of a get method would be to not change anything.

    Should we copy the skeletion on login? on create of the user? (issue with shibboleth)

  12. 8 remaining items

  13. rullzer commented on Feb 15, 2016

    @rullzer
    Contributor

    I think I can find some kind of way around this... I'll look into it...

  14. self-assigned this
    on Feb 15, 2016
  15. rullzer commented on Feb 15, 2016

    @rullzer
    Contributor

    PR in #22410

  16. rullzer commented on Feb 16, 2016

    @rullzer
    Contributor

    Issue to rethink how we handle avatars for a later release... #22414

  17. PVince81 commented on Feb 18, 2016

    @PVince81
    Contributor

    I also discovered that cron.php for CalDAV also does this:

    0  OC_Util::copySkeleton() /srv/www/htdocs/owncloud/lib/private/util.php:307
    1  OC\Files\Node\Root->getUserFolder() /srv/www/htdocs/owncloud/lib/private/files/node/root.php:347
    2  OC\AvatarManager->getAvatar() /srv/www/htdocs/owncloud/lib/private/avatarmanager.php:69
    3  OC\User\User->getAvatarImage() /srv/www/htdocs/owncloud/lib/private/user/user.php:380
    4  OCA\DAV\CardDAV\Converter->getAvatarImage() /srv/www/htdocs/owncloud/apps/dav/lib/carddav/converter.php:164
    5  OCA\DAV\CardDAV\Converter->createCardFromUser() /srv/www/htdocs/owncloud/apps/dav/lib/carddav/converter.php:42
    6  OCA\DAV\CardDAV\SyncService->updateUser() /srv/www/htdocs/owncloud/apps/dav/lib/carddav/syncservice.php:205
    7  OCA\DAV\CardDAV\SyncService->OCA\DAV\CardDAV\{closure}() /srv/www/htdocs/owncloud/apps/dav/lib/carddav/syncservice.php:246
    8  OC\User\Manager->callForAllUsers() /srv/www/htdocs/owncloud/lib/private/user/manager.php:337
    9  OCA\DAV\CardDAV\SyncService->syncInstance() /srv/www/htdocs/owncloud/apps/dav/lib/carddav/syncservice.php:250
    10 OCA\DAV\CardDAV\SyncJob->run() /srv/www/htdocs/owncloud/apps/dav/lib/carddav/syncjob.php:38
    11 OC\BackgroundJob\Job->execute() /srv/www/htdocs/owncloud/lib/private/backgroundjob/job.php:52
    12 OC\BackgroundJob\TimedJob->execute() /srv/www/htdocs/owncloud/lib/private/backgroundjob/timedjob.php:53
    13 {main}          /srv/www/htdocs/owncloud/cron.php:141
    
  18. PVince81 commented on Feb 18, 2016

    @PVince81
    Contributor

    and copies the skeleton for all my 200+ LDAP users...

  19. rullzer commented on Feb 18, 2016

    @rullzer
    Contributor

    This is because the ldap app want the avatar stuff. So hopefully also fixed with #22410

  20. 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.

  21. 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