Fix for non-root user and send custom command

Thanks to DougieLawson for the fix