Oct-27-2016, 06:39 AM
I have this code which works fine when i run it through terminal. But when i get to the link via browser, it gives me an error:
Output on terminal:
Quote:sh: hdfs: command not found
#!/usr/bin/python
import cgi
import cgitb
import os
import commands
cgitb.enable()
print "content-type:text/html"
print ""
print "--html--"
a=commands.getstatusoutput("hdfs dfs -ls -R /")
print a[1]Can someone tell me why this is happening?Output on terminal:
