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
failed to load external Lua file #18
Comments
@xu4wang This is really about basic *NIX permissions, not OpenResty. To solve a path (by the OS), all the directories on the path should be executable by the current system account, not just the file being readable. This is why putting the file under /tmp works for you since the /tmp directory itself is very permissive. |
Thanks for the quick response... Problem solved. |
Visitor from the future with a permissions-based problem. Ran into a similar issue where the process is running as |
Nevermind, solved this rather quickly. It can be done with the nginx config:
|
@crockpotveggies It's a bad idea to run the nginx workers as |
It's a private network not exposed to the outside Internet. Nuff said 😉
|
In my Gentoo, to avoid 404, It must set these two steps:
========================== |
I am using mac os, with openresty 1.9.3.2
The issue I met is similar to:
http://stackoverflow.com/questions/28087228/openresty-content-by-lua-file
The server cannot load external Lua script:
2015/11/30 21:03:06 [error] 61190#0: *1 failed to load external Lua file "/Users/wangxu/Documents/work/tms/dev/tms/lua/req.lua": cannot open /Users/wangxu/Documents/work/tms/dev/tms/lua/req.lua: Permission denied, client: 127.0.0.1, server: , request: "GET /v1/p HTTP/1.1", host: "127.0.0.1"
However If I copy the lua file into /tmp and use
content_by_lua_file "/tmp/req.lua";
Everything is OK.
I checked the path, the permissions.. they are all correct.
The text was updated successfully, but these errors were encountered: