How to restrict access to ipython laptop directory

I am running the ipython server for laptops in the cloud and I want to expose this as a service so that users can play with the laptop, I noticed that with the help of the laptop I can access the file system and check the files in the file system, I want to restrict this access . I want only special folders available from the ipython laptop.

+4
source share
1 answer

You can run your iPython laptop in a folder to which you must have access to the server, and the user cannot go to the parent directory, but you must understand that when the user starts the kernel, they will be able to chdir to any folder in the file system.

So, if you want to restrict access to iPython laptop users, you must use unix file permissions to put the user in the start folder.

How would I do this:

  • Create a user ipythonwho does not belong to existing user groups.
  • Create a folder for ipython user (e.g. cloud)
  • Launch iPython laptop as ipythonin a foldercloud
+4
source

Source: https://habr.com/ru/post/1542504/


All Articles