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

为什么都root用户了还会提示Permission denied #28

Open
niuhp opened this issue May 20, 2016 · 9 comments
Open

为什么都root用户了还会提示Permission denied #28

niuhp opened this issue May 20, 2016 · 9 comments

Comments

@niuhp
Copy link

niuhp commented May 20, 2016

请求任何接口都返回404,日志里提示
cannot open /path/to/ABTestingGateway-master/utils/../admin/ab_action.lua: Permission denied
现在都是root用户了怎么还会这样,权限也改成777了
-rwxrwxrwx 1 root root 2681 May 11 15:54 ab_action.lua
-rwxrwxrwx 1 root root 2303 May 11 15:54 action.lua
-rwxrwxrwx 1 root root 7857 May 11 15:54 policygroup.lua
-rwxrwxrwx 1 root root 6093 May 11 15:54 policy.lua
-rwxrwxrwx 1 root root 7173 May 11 15:54 runtime.lua

@brg-liuwei
Copy link

你检查一下这几个lua文件所在的目录是不是对nginx worker用户开放了可执行权限

请求任何接口都返回404,日志里提示
cannot open /path/to/ABTestingGateway-master/utils/../admin/ab_action.lua: Permission denied
现在都是root用户了怎么还会这样,权限也改成777了
-rwxrwxrwx 1 root root 2681 May 11 15:54 ab_action.lua
-rwxrwxrwx 1 root root 2303 May 11 15:54 action.lua
-rwxrwxrwx 1 root root 7857 May 11 15:54 policygroup.lua
-rwxrwxrwx 1 root root 6093 May 11 15:54 policy.lua
-rwxrwxrwx 1 root root 7173 May 11 15:54 runtime.lua


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #28

@niuhp
Copy link
Author

niuhp commented May 20, 2016

不是,,,,nginx.conf里没有指定用户,默认用的nobody,,,官方文档不详细啊,,对于我们这种新手刚开始不少踩坑

@brg-liuwei
Copy link

不是,,,,nginx.conf里没有指定用户,默认用的nobody,,,官方文档不详细啊,,对于我们这种新手刚开始不少踩坑

看看你的lua文件所在的目录有没有 x 权限,你现在是所有lua文件都改成777了,但是如果lua文件所在的目录没有x,那么还是会出现权限问题的。

你明白我的意思了么?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #28 (comment)

@niuhp
Copy link
Author

niuhp commented May 20, 2016

都有的,,现在用户权限问题好了,,又来这个,要崩溃了
2016/05/20 17:15:54 [error] 23024#0: *7 lua entry thread aborted: runtime error: ...oft/ABTestingGateway-master/utils/../admin/ab_action.lua:5: loop or previous error loading module 'abtesting.utils.utils'
stack traceback:
coroutine 0:
[C]: in function 'require'
...oft/ABTestingGateway-master/utils/../admin/ab_action.lua:5: in function <...oft/ABTestingGateway-master/utils/../admin/ab_action.lua:1>, client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"
2016/05/20 17:15:54 [error] 23024#0: *7 open() "/root/soft/ABTestingGateway-master/utils/html/50x.html" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "POST /ab_admin?action=policygroup_set HTTP/1.1", host: "127.0.0.1:8080"

@BG2BKK
Copy link
Contributor

BG2BKK commented May 20, 2016

你好,这个问题应该是lualib的路径配置不对

git clone下repo后,在utils路径下,有abtesting.conf这个脚本,您什么都不用配置,启动redis后,执行该脚本,应该是不会出现这种问题的;repo提供了最小示例,包括nginx配置文件的。

目测现在你遇到的问题,仍然是文件权限的问题;建议先在自己的路径下以普通用户执行脚本再试试。

@fankeke
Copy link

fankeke commented Jun 2, 2016

lua entry thread aborted: runtime error: ...oft/ABTestingGateway-master/utils/../admin/ab_action.lua:5: loop or previous error loading module 'abtesting.utils.utils'

同样遇到这个问题,如何解决??访问的时候返回500
另外我把所有的nginx都开成root启动,应该不会有权限问题。

@BG2BKK
Copy link
Contributor

BG2BKK commented Jun 2, 2016

你好,nginx的worker属主可能是nobody了,检查下worker

@fankeke
Copy link

fankeke commented Jun 2, 2016

你好,我把user 全都换成了root,没有Permission denied的情况了,访问admin也正常,配置策略也正常。但是访问的时候出现:ua entry thread aborted: runtime error: ...oft/ABTestingGateway-master/utils/../admin/ab_action.lua:5: loop or previous error loading module 'abtesting.utils.utils'

返回错误500 Internal Server Error

@xiaosazixian
Copy link

权限问题该怎么解决啊,我也是把那个admin下面的lua脚本给了777的权限,但还是不行。

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

5 participants