How should we restrict user from moving to other /(root) directory in the terminal. #13381
Replies: 2 comments
-
Hey @balakrishna-maduru, Theia cannot provide such functionality, since all Theia does is provide a stream to a shell process. Theia has no influence on the commands executed by the shell process. The recommended solution would be to start the Theia app with a user that has restricted access to the file system. Every shell started by the Theia app will then inherit those file system restrictions. You can just remove read/write access from files/directories you want to hide and set the Theia app to readonly to prevent the app user from overwriting IDE files. Note that this requires read access, since the user still needs to run the app, which isn't possible without read access. |
Beta Was this translation helpful? Give feedback.
-
A couple of options: Try If you're not already, run Theia in a container. You can give them root access inside the container and the worst that could happen is they have to restart the container to undo any damage they did. |
Beta Was this translation helpful? Give feedback.
-
When user open terminal default workspace it is opening in terminal, We need to restrict user not to change user from navigating to other directories, Is there any way We can achive this in theia terminal?
Beta Was this translation helpful? Give feedback.
All reactions