Linux command called "file" returns "application/x-empty" only when executing through web
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.
精彩评论