Check permissions.