Skip to content

Home folder variations to investigate / use getHome() instead of root view #14770

Closed

Description

@PVince81

Recently I heard that the LDAP admin settings make it possible to specify the format of the name of the home folder.

However there are many places in the code that assume that the home folder is always in the format "$datadir/$userId". This is mostly when a root view is used, then it concatenated the user name instead of using getHome().

We need to check whether these parts are compatible. I suspect this is likely to break...

@icewind1991 @MorrisJobke @schiesbn @blizzz

Activity

  1. changed the title [-]Home folder variations to investigate[/-] [+]Home folder variations to investigate / use getHome() instead of root view[/+] on Mar 9, 2015
  2. blizzz commented on Mar 9, 2015

    @blizzz
    Contributor

    In setupFS the user folder as returned by getHome by the corresponding backend is mounted as $datadir/$userId so that subsequent views etc. to $datadir/$userId resolve just fine.

  3. blizzz commented on Mar 9, 2015

    @blizzz
    Contributor

    Also, getHome() is never expected to be called from anywhere else than setupFS. (I have gotten it wrong back then when this stuff was introduced and also thought this way. There were ways to circumvent/directly access files, which broke.)

  4. PVince81 commented on Mar 10, 2015

    @PVince81
    ContributorAuthor

    So if I understand well, this means that if someone creates a root view and forgets to do setupFS for a given user, then the home will not be mounted properly.

    So let's say setupFS('uuid') would mount the uuid folder onto "$datadir/userid". If someone uses a root view but forgets to call setupFS('uuid'), then the view will be looking for a real folder "$datadir/userid" instead of the mounted one.
    This sounds very similar to what I observed with @Elethiomel on IRC yesterday.

    While looking at the encryption migration code, I noticed that setupFS() only worked for the first user, because subsequent calls would have $fsExists already true. Will raise separately.

  5. blizzz commented on Mar 10, 2015

    @blizzz
    Contributor

    setupFS should be called as early as possible of course, and I am not aware of any issues… which does not mean that there are none or were re-introduced.

    While looking at the encryption migration code, I noticed that setupFS() only worked for the first user, because subsequent calls would have $fsExists already true. Will raise separately.

    In that case we indeed need to tearDownFS() it before setting it up for another user. It resets the fsSetup marker.

  6. PVince81 commented on Mar 10, 2015

    @PVince81
    ContributorAuthor

    Raised ticket for missing tearDownFS() here: #14775

  7. blizzz commented on Aug 7, 2015

    @blizzz
    Contributor

    tearDown is implemented, we can close. Reopen, if not.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions