Correct of script for permissions setting.