check permissions