> 解决 OpenClaw 飞书发送文件时的路径白名单问题!
> Solve OpenClaw Feishu file path whitelist issue!
OpenClaw 发送飞书图片/文件时,飞书插件读取本地文件经过核心的路径白名单检查,导致只能发送白名单路径内的文件。
When sending Feishu images/files via OpenClaw, the Feishu plugin reads local files through OpenClaw's path whitelist check, which only allows files in whitelisted paths.
cd skills/feishu-temp-file
# 显示权限选项
node scripts/perm-config.js
# 选择并应用配置 (1/2/3)
node scripts/perm-config.js 2
权限选项说明:
| 选项 | 名称 | 路径范围 |
|---|---|---|
| ------ | ------ | --------- |
| 1 | 限制级 | /home/admin, /tmp, /home |
| 2 | 中等 | /home, /tmp, /opt, /var, /srv |
| 3 | 宽松 | /** (整个系统) |
# 检查临时目录权限状态
node scripts/check-perm.js
# 复制文件到临时目录
node scripts/prepare.js /path/to/your/file.png
# 发送成功后清理
node scripts/clean.js
| 脚本 | 功能 |
|---|---|
| ------ | ------ |
perm-config.js | 配置技能读取权限 (首次必做) ✅ |
check-perm.js | 检查临时目录权限状态 |
prepare.js | 复制文件到临时目录 |
list.js | 列出临时文件 |
clean.js | 清理临时文件 |
detect-system.js | 检测系统类型 |
feishu-temp-file/
├── SKILL.md
├── _meta.json
├── package.json
├── config.example.json
└── scripts/
├── shared.js
├── perm-config.js # 配置权限 ✅ (新增)
├── check-perm.js
├── prepare.js
├── list.js
└── clean.js
perm-config.js - 配置技能读取权限~/.openclaw/openclaw.json提示: 建议选择"中等"权限,既方便使用又相对安全!
Tip: Recommend option 2 (Medium) for balance between convenience and security!
共 1 个版本