microsoft / TaskWeaver

A code-first agent framework for seamlessly planning and executing data analytics tasks.
https://microsoft.github.io/TaskWeaver/
MIT License
5.38k stars 689 forks source link

Permissions assignment failed for secure file: Got '0o677' instead of '0o0600'. #287

Closed georgehu0815 closed 4 months ago

georgehu0815 commented 7 months ago

Describe the bug When run in execution_service in local model, it reached the issue.

{ "llm.api_base": "https://.openai.azure.com/", "llm.api_key": "", "llm.api_type":"azure", "llm.api_version":"2024-02-15-preview", "llm.model": "gpt-4", "llm.response_format":null, "execution_service.kernel_mode":"local" }

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Start the service and go to UI
  2. Type the user query "genarate 100 random numbers"
  3. Wait for the response
  4. Type the user query "yyy"
  5. See error
  6. kw = await self.provisioner.pre_launch(**kw) File "/home/bochuxt/.local/lib/python3.10/site-packages/jupyter_client/provisioning/local_provisioner.py", line 190, in pre_launch km.write_connection_file() File "/home/bochuxt/.local/lib/python3.10/site-packages/jupyter_client/connect.py", line 503, in write_connection_file self.connection_file, cfg = write_connection_file( File "/home/bochuxt/.local/lib/python3.10/site-packages/jupyter_client/connect.py", line 164, in write_connection_file with secure_write(fname) as f: File "/usr/lib/python3.10/contextlib.py", line 135, in enter return next(self.gen) File "/home/bochuxt/.local/lib/python3.10/site-packages/jupyter_core/paths.py", line 999, in secure_write raise RuntimeError(msg) RuntimeError: Permissions assignment failed for secure file: '/mnt/a/TaskWeaver2/project/workspace/sessions/20240407-163322-113f9167/ces/conn-20240407-163322-113f9167-knl-61c09b99b25f.json'. Got '0o677' instead of '0o0600'. image

Expected behavior

A clear and concise description of what you expected to happen. NA if feel not applicable.

Screenshots If applicable, add screenshots to help explain your problem.

Environment Information (please complete the following information):

Additional context Add any other context about the problem here.

liqul commented 7 months ago

Thanks for reporting this issue. I found an issue here saying this is caused by the WSL file system permission. A workaround would be setting the environment variable JUPYTER_ALLOW_INSECURE_WRITES=true as described there.

georgehu0815 commented 7 months ago

works now, thanks for your help. you can close this ticket.