Skip to content

Lock down file browser to certain directory #86

Closed

Description

Being able to browse / in a docker container might be unwanted behavior.
I'd like to set an environment variable which locks the file/folder browser to a certain directory, such as /data/projects, etc.

Activity

  1. kylecarbs commented on Mar 7, 2019

    @kylecarbs
    Member

    Interesting. Wouldn't someone be able to use the terminal to break out anyways?

    For a jailed session, I'd recommend running a docker container with the project directory mounted in.

  2. unixfox commented on Mar 8, 2019

    @unixfox

    What about using systemd to lock down the session? Systemd is very powerful at that, it's even possible to set some parameters to protect against a fork bomb:

    systemd nspawn would be also a great tool to easily lock down the session: https://wiki.archlinux.org/index.php/systemd-nspawn
    On systemd nspawn you can even launch unprivileged containers.

  3. unixfox commented on Mar 8, 2019

    @unixfox

    I didn't mean to only use systemd, we could provide several type of config for the user.

  4. nhooyr commented on Mar 8, 2019

    @nhooyr
    Contributor

    I don't think its appropriate to implement this as part of code-server.

    You can always deploy the docker image and only mount the directory you want edited.

  5. nhooyr commented on Mar 9, 2019

    @nhooyr
    Contributor

    You can build a custom docker image based on the existing image. See docker's FROM. So you wouldn't have to do things each time.

    We can evaluate docker containers as terminals in a different issue.

    This issue was about locking vscode server down which I think is out of scope. You can put it in a VM or a container easily if you want an isolated environment.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions