fix bug; cstr length is wrong
Support test for user permission