Fix issues on privilege checking method for posix

Signed-off-by: huhamhire <me@huhamhire.com>