`shutil.copytree` fails due to `os.setxattr` Permission denied on lustre filesystem
未關閉
還沒有人認領這個 Issue。
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Bug report
Bug description:
When running shutil.copytree on a lustre filesystem with a source dir containing files with 440 permissions, os.setxattr fails with permission denied.
This seems to be related to #68726.
The file are copied with the original read-only permission and the copy/setting of extended attributes is failing afterwards
CPython versions tested on:
3.11
Operating systems tested on:
Linux
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先,在 Linux 上使用包含權限為 440 的檔案的 Lustre 來源重現 shutil.copytree 失敗。閱讀 os.setxattr 附近的 copytree 處理邏輯,並對照 issue #68726 中的相關討論。當複製後的檔案保持唯讀時,所回報的複製操作不再失敗,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- linux, python
- 領域
- operating-systems
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100