Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a installer from package maker and scripts I specified scripts directory and postinstall script. When I installs the package it application installs fine but the scripts I specified is not running. Somewhere I read executable bit must be set but I did not find from to set this bit.

Following is the is my script. In this I am setting path variables in plist. Please guide me on this..


# if the file doesn't exist, try to create folder
if [ ! -f $FILE ]
  mkdir -p ~/.MacOSX

# then just add entries (file will be created if it doesn't exist)
$PLIST -c "Add :Variable1 string 'Value1'" $FILE
$PLIST -c "Add :Variable2 string 'Value2'" $FILE
echo "Ended" >> ok.txt
exit 0

enter image description here

share|improve this question
Can you execute the script directly in Terminal by entering its full path? – Daniel Beck May 28 '11 at 16:26
up vote 1 down vote accepted

Open Terminal and enter the following:

chmod +x /Users/sandy/Resource/

This will set the executable flag on the file.

share|improve this answer
Also, it's good practice to use #!/usr/bin/env bash instead of hard-coding the path to bash. – Daniel Beck May 28 '11 at 16:22
Sorry, blame that on me :) – slhck May 28 '11 at 17:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.