file_permissions
Manage file and directory permissions across platforms using chmod for Unix and icacls for Windows. Supports recursive permission settings with depth control for consistent access management.
Instructions
跨平台文件权限管理:Unix系统使用chmod,Windows系统使用icacls。支持递归设置。
示例:设置文件权限 { "path": "script.sh", "mode": "755" } 示例:递归设置目录权限 { "path": "project", "mode": "644", "recursive": true, "max_depth": 3 }
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 文件或目录的绝对路径,或相对于 working_directory 的相对路径 | |
| mode | No | 文件权限模式,如 "755"(rwxr-xr-x)、"644"(rw-r--r--) | |
| permissions | No | Windows权限设置对象 | |
| recursive | No | 是否递归处理子目录 | |
| max_depth | No | 最大递归深度,0表示不递归,默认8 | |
| output_format | No | 输出格式:text(纯文本)、json(结构化JSON)、both(两者兼有) |