def getowner(path2):
import os
if not os.path.exists(path2):
print ""path2" does not exsit."
exitcode(2)
tmp=None
if os.path.isdir(path2):
tmp=os.popen("ls -ld %s|
awk '{print $3}' " % path2).readlines()
else:
tmp=os.popen("ls -l %s|awk '{print $3}' "% path2).readlines()
return tmp[0].strip()