why does happened permision error when jupyterlab run as a container

My project need use jupyterlab with Docker,but when I run a container,some confusing error happened.the JupyterLab told me that:

RuntimeError: Permissions assignment failed for secure file: '/home/jovyan/.local/share/jupyter/runtime/kernel-5784089a-e10f-419c-a89c-2dece2d01cf3.json'.Got '0o655' instead of '0o0600'

I don’t know how to fix it and need some help.

Here is some clues:

  • My docker images:
    enter image description here

enter image description here

PS C:Usersbbhl7>  docker run --name jupyter -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v D:Projectsnotebooks:/home/jovyan jupyter/base-notebook
Executing the command: jupyter lab
[I 05:39:03.296 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 05:39:03.296 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 05:39:03.579 LabApp] Serving notebooks from local directory: /home/jovyan
[I 05:39:03.579 LabApp] The Jupyter Notebook is running at:
[I 05:39:03.579 LabApp] http://399d8ee9402e:8888/?token=2b72f436b8600872e7c4939b633a422f0f376acf38e704b7
[I 05:39:03.579 LabApp]  or http://127.0.0.1:8888/?token=2b72f436b8600872e7c4939b633a422f0f376acf38e704b7
[I 05:39:03.579 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 05:39:03.598 LabApp]

    To access the notebook, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/nbserver-6-open.html
    Or copy and paste one of these URLs:
        http://399d8ee9402e:8888/?token=2b72f436b8600872e7c4939b633a422f0f376acf38e704b7
     or http://127.0.0.1:8888/?token=2b72f436b8600872e7c4939b633a422f0f376acf38e704b7
[I 05:39:17.507 LabApp] 302 GET /?token=2b72f436b8600872e7c4939b633a422f0f376acf38e704b7 (172.17.0.1) 1.00ms
[I 05:39:19.078 LabApp] Build is up to date
[E 05:39:21.631 LabApp] Uncaught exception POST /api/sessions?1582868357137 (172.17.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8888', method='POST', uri='/api/sessions?1582868357137', version='HTTP/1.1', remote_ip='172.17.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
        result = await result
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/opt/conda/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
        type=mtype))
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
        value = future.result()
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/opt/conda/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session
        kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
        value = future.result()
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/opt/conda/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session
        self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
        value = future.result()
      File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
        yielded = next(result)
      File "/opt/conda/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
        super(MappingKernelManager, self).start_kernel(**kwargs)
      File "/opt/conda/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
        km.start_kernel(**kwargs)
      File "/opt/conda/lib/python3.7/site-packages/jupyter_client/manager.py", line 240, in start_kernel
        self.write_connection_file()
      File "/opt/conda/lib/python3.7/site-packages/jupyter_client/connect.py", line 476, in write_connection_file
        kernel_name=self.kernel_name
      File "/opt/conda/lib/python3.7/site-packages/jupyter_client/connect.py", line 141, in write_connection_file
        with secure_write(fname) as f:
      File "/opt/conda/lib/python3.7/contextlib.py", line 112, in __enter__
        return next(self.gen)
      File "/opt/conda/lib/python3.7/site-packages/jupyter_core/paths.py", line 433, in secure_write
        .format(file=fname, permissions=oct(file_mode)))
    RuntimeError: Permissions assignment failed for secure file: '/home/jovyan/.local/share/jupyter/runtime/kernel-5784089a-e10f-419c-a89c-2dece2d01cf3.json'.Got '0o655' instead of '0o0600'
[W 05:39:21.636 LabApp] Unhandled error
[E 05:39:21.637 LabApp] {
      "Host": "127.0.0.1:8888",
      "Connection": "keep-alive",
      "Content-Length": "95",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.17 Safari/537.36 Edg/81.0.416.12",
      "X-Xsrftoken": "2|0c1097cb|034b6855fa6e574849aeff2934e5e844|1581992554",
      "Authorization": "token 2b72f436b8600872e7c4939b633a422f0f376acf38e704b7",
      "Content-Type": "application/json",
      "Accept": "*/*",
      "Origin": "http://127.0.0.1:8888",
      "Sec-Fetch-Site": "same-origin",
      "Sec-Fetch-Mode": "cors",
      "Sec-Fetch-Dest": "empty",
      "Referer": "http://127.0.0.1:8888/lab",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
      "Cookie": "_xsrf=2|0c1097cb|034b6855fa6e574849aeff2934e5e844|1581992554; username-127-0-0-1-8888="2|1:0|10:1582868359|23:username-127-0-0-1-8888|44:MGE1OGFhYTMwNWMwNGNkNWJjNzQzNTIzMTI3Mjg2NGU=|57e2f2439572d8e99a67c9b52307ca2f0525d161f3faab5a7594f42768e75cbd""
    }
[E 05:39:21.637 LabApp] 500 POST /api/sessions?1582868357137 (172.17.0.1) 49.19ms referer=http://127.0.0.1:8888/lab

Source: StackOverflow