bnc#799068: Added sudo permission check.