Fix permissions issue and remove redundant commands