Skip to content

basedir #2

@konsumer

Description

@konsumer

Since we can't really control that / is root, and it's memfs in zenfs, it would be cool to be able to sort of "chroot" (lock access to a specific directory.) This would allow mounting /zip then switching / to /zip, so /cyber.txt is a file inside the zip.

I think this could be done by translating any directories to prepend this.rootDir and then allow setting that.

Normally, I would make sure that users can't do things like /somedir/../../.., but for this case it's not really important. It's sort of a "light sandbox" since you can just not mount things you don't want the user to access, still maybe a "nice to have" to make sure it can't access anything outside of /.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions