vernesong / OpenClash

A Clash Client For OpenWrt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] 升级v0.46.003卡住失败,重装后读取 open /etc/openclash/config.yaml: permission denied"

gzw13999 opened this issue · comments

Verify Steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Branch 我知道 OpenClash 的 Dev 分支切换开关位于插件设置-版本更新中,或者我会手动下载并安装 Dev 分支的 OpenClash
  • Latest 我已经使用最新 Dev 版本测试过,问题依旧存在
  • Relevant 我知道 OpenClash 与 内核(Core)、控制面板(Dashboard)、在线订阅转换(Subconverter)等项目之间无直接关系,仅相互调用
  • Definite 这确实是 OpenClash 出现的问题
  • Contributors 我有能力协助 OpenClash 开发并解决此问题
  • Meaningless 我提交的是无意义的催促更新或修复请求

OpenClash Version

v0.46.003

Bug on Environment

Official OpenWrt

OpenWrt Version

v0.46.003

Bug on Platform

Linux-armv7

Describe the Bug

内核具体日志
2024-03-18 16:24:44 level=error msg="open /etc/openclash/config.yaml: permission denied"
2024-03-18 16:21:54 level=error msg="open /etc/openclash/config.yaml: permission denied"
2024-03-18 16:21:22 level=error msg="open /etc/openclash/config.yaml: permission denied"

To Reproduce

升级v0.46.003 提示升级完提示版本查询失败,于是我就刷新了页面但是页面一刷新就提示页面不存在了,整个刷新服务里面openclash插件的选项都没了,于是我就通过安装包重新安装了插件,刚开始安装的V0.46.001版本服务可以正常运行,我再次升级后服务器就无法揿动了查看内核日志就显示
2024-03-18 16:21:22 level=error msg="open /etc/openclash/config.yaml: permission denied"

OpenClash Log

2024-03-18 16:24:48 第六步:删除 OpenClash 残留文件...
2024-03-18 16:24:47 第五步: 重启 Dnsmasq 程序...
2024-03-18 16:24:47 第四步: 关闭 Clash 主程序...
2024-03-18 16:24:47 第三步: 关闭 OpenClash 守护程序...
2024-03-18 16:24:45 第二步: 删除 OpenClash 防火墙规则...
2024-03-18 16:24:45 第一步: 备份当前策略组状态...
2024-03-18 16:24:45 OpenClash 开始关闭...
2024-03-18 16:24:44 错误:配置文件测试失败,请查看《内核日志》排查失败原因!
2024-03-18 16:24:44 配置文件【/etc/openclash/config.yaml】测试失败...
2024-03-18 16:24:43 启动前调用内核测试配置文件...
2024-03-18 16:24:43 提示:检测到配置了 Meta 内核专属功能,调用 Meta 内核启动...
2024-03-18 16:24:43 第四步: 启动主程序...
2024-03-18 16:24:43 提示:开始运行自定义覆写脚本...
2024-03-18 16:24:42 警告:由于第三方规则设置中的策略组名称与配置文件中的不符或不存在,停止继续设置第三方规则!
2024-03-18 16:24:42 警告:检测到启用了多个第三方规则配置,忽略后续配置...
2024-03-18 16:24:42 提示:您为 SOCKS5/HTTP(S) 代理设置的账户密码为【Clash:xoxuCArD】
2024-03-18 16:24:41 第三步: 修改配置文件...
2024-03-18 16:24:41 第二步: 组件运行前检查...
2024-03-18 16:24:40 第一步: 获取配置...
2024-03-18 16:24:40 OpenClash 开始启动...
2024-03-18 16:24:40 第六步:删除 OpenClash 残留文件...
2024-03-18 16:24:40 第五步: 重启 Dnsmasq 程序...
2024-03-18 16:24:40 第四步: 关闭 Clash 主程序...
2024-03-18 16:24:40 第三步: 关闭 OpenClash 守护程序...
2024-03-18 16:24:37 第二步: 删除 OpenClash 防火墙规则...
2024-03-18 16:24:37 第一步: 备份当前策略组状态...
2024-03-18 16:24:37 OpenClash 开始关闭...
2024-03-18 16:24:37 OpenClash 重新启动中...
2024-03-18 16:21:59 第六步:删除 OpenClash 残留文件...
2024-03-18 16:21:58 第五步: 重启 Dnsmasq 程序...
2024-03-18 16:21:58 第四步: 关闭 Clash 主程序...
2024-03-18 16:21:58 第三步: 关闭 OpenClash 守护程序...
2024-03-18 16:21:56 第二步: 删除 OpenClash 防火墙规则...
2024-03-18 16:21:55 第一步: 备份当前策略组状态...
2024-03-18 16:21:55 OpenClash 开始关闭...
2024-03-18 16:21:54 错误:配置文件测试失败,请查看《内核日志》排查失败原因!
2024-03-18 16:21:54 配置文件【/etc/openclash/config.yaml】测试失败...
2024-03-18 16:21:53 启动前调用内核测试配置文件...
2024-03-18 16:21:53 提示:检测到配置了 Meta 内核专属功能,调用 Meta 内核启动...
2024-03-18 16:21:53 第四步: 启动主程序...
2024-03-18 16:21:53 提示:开始运行自定义覆写脚本...
2024-03-18 16:21:53 警告:由于第三方规则设置中的策略组名称与配置文件中的不符或不存在,停止继续设置第三方规则!
2024-03-18 16:21:53 警告:检测到启用了多个第三方规则配置,忽略后续配置...
2024-03-18 16:21:52 提示:您为 SOCKS5/HTTP(S) 代理设置的账户密码为【Clash:xoxuCArD】
2024-03-18 16:21:52 第三步: 修改配置文件...
2024-03-18 16:21:51 第二步: 组件运行前检查...
2024-03-18 16:21:51 第一步: 获取配置...
2024-03-18 16:21:51 OpenClash 开始启动...
2024-03-18 16:21:51 第六步:删除 OpenClash 残留文件...
2024-03-18 16:21:50 第五步: 重启 Dnsmasq 程序...
2024-03-18 16:21:50 第四步: 关闭 Clash 主程序...
2024-03-18 16:21:50 第三步: 关闭 OpenClash 守护程序...
2024-03-18 16:21:48 第二步: 删除 OpenClash 防火墙规则...
2024-03-18 16:21:48 第一步: 备份当前策略组状态...
2024-03-18 16:21:48 OpenClash 开始关闭...
2024-03-18 16:21:48 OpenClash 重新启动中...
2024-03-18 16:21:25 第六步:删除 OpenClash 残留文件...
2024-03-18 16:21:25 第五步: 重启 Dnsmasq 程序...
2024-03-18 16:21:25 第四步: 关闭 Clash 主程序...
2024-03-18 16:21:25 第三步: 关闭 OpenClash 守护程序...
2024-03-18 16:21:23 第二步: 删除 OpenClash 防火墙规则...
2024-03-18 16:21:23 第一步: 备份当前策略组状态...
2024-03-18 16:21:23 OpenClash 开始关闭...
2024-03-18 16:21:22 错误:配置文件测试失败,请查看《内核日志》排查失败原因!
2024-03-18 16:21:22 配置文件【/etc/openclash/config.yaml】测试失败...
2024-03-18 16:21:21 启动前调用内核测试配置文件...
2024-03-18 16:21:21 提示:检测到配置了 Meta 内核专属功能,调用 Meta 内核启动...
2024-03-18 16:21:21 第四步: 启动主程序...
2024-03-18 16:21:20 提示:开始运行自定义覆写脚本...
2024-03-18 16:21:20 警告:由于第三方规则设置中的策略组名称与配置文件中的不符或不存在,停止继续设置第三方规则!
2024-03-18 16:21:20 警告:检测到启用了多个第三方规则配置,忽略后续配置...
2024-03-18 16:21:19 提示:您为 SOCKS5/HTTP(S) 代理设置的账户密码为【Clash:xoxuCArD】
2024-03-18 16:21:19 第三步: 修改配置文件...
2024-03-18 16:21:18 第二步: 组件运行前检查...
2024-03-18 16:21:17 第一步: 获取配置...
2024-03-18 16:21:17 OpenClash 开始启动...
2024-03-18 16:21:17 第六步:删除 OpenClash 残留文件...
2024-03-18 16:21:16 第五步: 重启 Dnsmasq 程序...
2024-03-18 16:21:16 第四步: 关闭 Clash 主程序...
2024-03-18 16:21:16 第三步: 关闭 OpenClash 守护程序...
2024-03-18 16:21:14 第二步: 删除 OpenClash 防火墙规则...
2024-03-18 16:21:14 第一步: 备份当前策略组状态...
2024-03-18 16:21:14 OpenClash 开始关闭...
2024-03-18 16:21:14 OpenClash 重新启动中...

OpenClash Config

No response

Expected Behavior

1.升级失败BUG,已经不是首次遇到了
2.v0.46.003版本无法读取旧的配置启动服务

Additional Context

No response

可能权限有问题,我看看

你这个配置文件什么权限,看一下

目前不在那台设备附近,明天查看完回复您。

你这个配置文件什么权限,看一下

文件具体权限如下
File: config.yaml
Size: 3048 Blocks: 8 IO Block: 4096 regular file
Device: 0,24 Inode: 351 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-03-18 16:24:43.000000000 +0800
Modify: 2024-03-20 12:59:32.128436567 +0800
Change: 2024-03-20 12:59:32.128436567 +0800
Birth: -

分别测试一下

nohup /etc/openclash/clash -t -d "/etc/openclash" -f "/etc/openclash/config.yaml"
chown root:root /etc/openclash/core/*
nohup /etc/openclash/clash -t -d "/etc/openclash" -f "/etc/openclash/config.yaml"

nohup /etc/openclash/clash -t -d "/etc/openclash" -f "/etc/openclash/config.yaml"

root@iStoreOS:~# nohup /etc/openclash/clash -t -d "/etc/openclash" -f "/etc/openclash/config.yaml"
nohup: ignoring input and appending output to 'nohup.out'
root@iStoreOS:~# ls
nohup.out
root@iStoreOS:~# cat nohup.out 
time="2024-03-21T05:04:31.210782056Z" level=error msg="open /etc/openclash/config.yaml: permission denied"
configuration file /etc/openclash/config.yaml test failed

chown root:root /etc/openclash/core/*
nohup /etc/openclash/clash -t -d "/etc/openclash" -f "/etc/openclash/config.yaml"

root@iStoreOS:~# chown root:root /etc/openclash/core/*
root@iStoreOS:~# nohup /etc/openclash/clash -t -d "/etc/openclash" -f "/etc/openclash/config.yaml"
nohup: ignoring input and appending output to 'nohup.out'
root@iStoreOS:~# 
root@iStoreOS:~# ls
nohup.out
root@iStoreOS:~# cat nohup.out 
time="2024-03-21T05:05:48.066935201Z" level=info msg="Start initial configuration in progress"
time="2024-03-21T05:05:48.06816106Z" level=info msg="Geodata Loader mode: memconservative"
time="2024-03-21T05:05:48.068206268Z" level=info msg="Geosite Matcher implementation: succinct"
time="2024-03-21T05:05:48.079287712Z" level=warning msg="Deprecated: Use Sniff instead"
time="2024-03-21T05:05:48.079359753Z" level=info msg="Initial configuration complete, total time: 12ms"
configuration file /etc/openclash/config.yaml test is successful

chown root:root /etc/openclash/core/*
给完权限后已经可以正常运行了,谢谢。