Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows编译的程序启动不了, Permission denied #125

Open
sven-pkt opened this issue Jun 10, 2022 · 6 comments
Open

windows编译的程序启动不了, Permission denied #125

sven-pkt opened this issue Jun 10, 2022 · 6 comments

Comments

@sven-pkt
Copy link

sven-pkt commented Jun 10, 2022

版本

docker部署的3.0.8

问题

  • 在windows编译后使用上传发布,启动报如下错误(看了是程序没有可执行权限)
    /usr/local/app/tars/tarsnode/data/k.Admin/bin/tars_start.sh: line 6: /usr/local/app/tars/tarsnode/data/k.Admin/bin/Admin: Permission denied
    后面我用docker换过3.0.7, 3.0.6都不成功,mac编译的能成功
@ruanshudong
Copy link
Contributor

没懂, windows编译的业务服务, 部署在docker里面?

@sven-pkt
Copy link
Author

sven-pkt commented Jun 10, 2022

忘了补充:
windows编译linux环境下的go可执行程序,该可执行程序发布后应该是没有可执行权限
我看了NodeServer代码有添加:
https://github.com/TarsCloud/TarsFramework/blob/v3.0.8/NodeServer/Activator.cpp#L46

所有一点疑问,这个是不是没有添加可执行权限成功还是其他问题

@ruanshudong
Copy link
Contributor

进容器, 手功能运行么?

@sven-pkt
Copy link
Author

容器内tars_start.sh文件还没显示出来,bin目录只有一个编译后的文件,文件没有x权限,需要手动chmod +x

@ruanshudong
Copy link
Contributor

我感觉是你编译完以后, copy了文件之类的, 导致丢失可执行权限? 最好检查你上传之前的操作, 看看哪一步丢失了可执行权限

@Jack-tae
Copy link

golang项目用windows交叉编译的Linux可执行文件,直接tar打包上传,没有copy操作,到了Linux下解压之后,默认是没有可执行权限的。tarsnode是docker方式运行的,服务是运行在tarsnode容器里面的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants