You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #4344 on March 28, 2024 14:28.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
联系方式
No response
1Panel 版本
v1.10.2-lts
问题描述
使用python写了一个操作容器的版本,在终端中执行正常,如下:
但是通过
计划任务
执行报错:如下:
计划任务执行shell脚本命令如下:
这个错误疑似是执行权限不足导致的,想问计划任务是以什么权限运行的?尝试通过在sh脚本中调用python,如下:
依旧报错。已经设置了脚本权限为
0777
和执行权限chmod +x
以及所有者权限chmod u+x
因此,想了解是否为计划任务
权限导致,感谢!python脚本相关执行代码如下:
进入容器查看文件权限,如下:
同时,给python脚本指定root执行,代码如下;
执行结果,依旧是终端中正常:
计划任务报上述错误:
重现步骤
/
期待的正确结果
No response
相关日志输出
No response
附加信息
No response
Beta Was this translation helpful? Give feedback.
All reactions