开发者

Linux command called "file" returns "application/x-empty" only when executing through web

开发者 https://www.devze.com 2023-02-03 19:49 出处:网络
I\'m trying to execute the command \"file /directory/*\" through the web, using Ajax that call a perl scri开发者_如何转开发pt.

I'm trying to execute the command "file /directory/*" through the web, using Ajax that call a perl scri开发者_如何转开发pt.

When I'm running the script from the server I get the mime type correctly, but when i'm using the web that trigger the ajax, i'm getting "application/x-empty".

If i'm running the command from the server using "sudo -u apache perl_script.pl" - the result is correct.

Why from the Ajax I get a different response ?


Try without the asterisk but instead with a complete filename.

0

精彩评论

暂无评论...
验证码 换一张
取 消