The current linux scripts for grants and create_schema tries to export log info to a text file, but this process can cause permission conflicts that prevent the scripts from completing successfully. Also some of these scripts try to issue a sudo command and run the gedit program to open the text file. However, the postgres user that's likely running this script would probably not have sudo permission (causing another conflict) and gedit isn't as common as vi or emacs (creating another point of failure). I've had to remove this info manually to get the scripts to run successfully.
The scripts in this zip file strips out the commands that try to create and open a text log file. The log file isn't really necessary (all the same info is displayed in the terminal) and prevents the permission errors from occurring.