Skip to content

Scoped users will not respect the base directory if the FS is readonly at user creation #1509

@tim42

Description

@tim42

Description
I have a readonly mount-point of a folder, let's say /files/data, configured this way:

    - path: /files/data
      name: data
      config:
        defaultUserScope: /users
        defaultEnabled: true

The user folder is instead created by a different process and may not exist when filebrowser is first accessed.

Expected behaviour
The user is not able to see anything. Ideally the source should be not visible for the user, as they cannot perform any action without it resulting in an error.
To keep the current behavior if it's requested, an option should be provided to enforce the user scope. I would suggest to default that value to true, but that would be a breaking change.

Another alternative way to prevent this would be to add support for something like {user} in the conditional rules (like let's say, deny everything except for folderPath: '/files/data/users/{user}')

What is happening instead?
The user dir is instead set to /data/users/, making them able to see/modify the files of every single other users.

How to reproduce?
Bind a folder as read-only in the container with the provided configuration. In my configuration, I authenticate the users with an openID provider. If the user dir does not exists, the user scope will be set to /files/data/users .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions