Different output of code in command line and browser

Skip to first unread message


Nov 7, 2022, 8:39:21 AM11/7/22
to openresty

I have an embedded linux, buildroot. I have to use pmbus_peek commands, that's why I need /dev/i2c-0. I do it with lua code from the browser, nginx is the server. Lua code is appended, nginx.conf too. If I use the command line "lua test.lua" then I get the same result as "ls -1 /dev/*". If I use the browser line "http://192.168.xxx.yyy/test.lua" a lot of items are lost, for instance "dev/i2c-0". Why there are different outputs, where is the i2c-0 item? The "test.lua" is for use in lua directly, if you use it with the browser remove the uncomment marks in lines 6 and 7.

Output stays the same if user in nginx.conf changes to "root".
Reply all
Reply to author
0 new messages