def file_property():
try:
filename = "/etc/network/interfaces"
cmd = "chmod 777 " + filename
run = pexpect.spawn('su -c "%s" root' %cmd)
time.sleep(0.5)
run.sendline('xxx')
time.sleep(0.1)
except Exception:
print traceback.format_exc()