Fix remote file system permissions problems

Running SSH command as a non-supperuser we got some file system
permission problems, this script fix it.