Windows sandbox: git status fails with working-directory permission denied despite allowed paths
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
Describe the bug
Copilot CLI continues to encounter filesystem access denials after I updated sandbox settings to allow access, including C:\Users\vineset . The effective policy has not been verified, so this may be a sandbox policy-application or process working-directory issue.
Environment: Windows; Copilot CLI 1.0.81-1 .
Steps to reproduce:
- Open a CLI session in a Git repository on the D: drive.
- Configure sandbox read/write permissions to allow the required paths.
- Ask the agent to run git -C "D:<repo>" status --short --branch .
- Update the sandbox permissions and retry in the same session.
Expected: Git reads the allowed repository and returns its status.
Actual: Every attempt fails with exit code 128:
fatal: Unable to read current working directory: Permission denied
Supporting observations:
- PowerShell successfully listed the repository and confirmed that .git exists.
- An earlier process-launch error reported C:\ as its working directory, although the session was configured for the repository on D:.
- Plugin management also failed to initialize logging because access to a file under %LOCALAPPDATA%\agency\logs was denied.
- The Git error does not identify the blocked path, making it difficult to determine which permission is missing.
Impact: Unable to run even read-only Git status operations; repository updates and plugin management are also blocked.
Please investigate: Whether tool processes inherit the correct working directory, whether sandbox setting changes reach subsequent processes in the current session, and whether an additional restriction overrides the configured allowed paths. If a restart is required, please make that explicit in the settings UI. Denial messages should identify the affected path and policy rule.
Uncertainty: The exact root cause is not established, and reproduction after a full CLI restart has not been confirmed.
Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện phiên Windows CLI trên một repository ở ổ D: và chạy lệnh git -C "D:<repo>" status --short --branch đã được báo cáo. So sánh thư mục làm việc được kế thừa, các thay đổi quyền của sandbox trong cùng một phiên với các thay đổi sau khi khởi động lại, và quyền truy cập vào %LOCALAPPDATA%\agency\logs. Được coi là hoàn tất khi nguyên nhân đã được xác định và các thông báo từ chối hoặc hành vi của cài đặt làm rõ đường dẫn bắt buộc và trạng thái khởi động lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, powershell, shell
- Lĩnh vực
- cli, security
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 38/100