AFP548

postflight unable to modify file

I am installing the Type to Learn 4 application onto the image using instaDMG. It installs correctly in /Applications/Sunburst/Type To Learn 4/ This part of the postflight script I got it to work fine #!/bin/bash mkdir -p "$3/Library/Application Support/Sunburst/Type to Learn 4" mv "$2/development.sqlite3" "$3/Library/Application Support/Sunburst/Type to Learn 4/" #open "$2" The problem comes because I need to modify the '/Applications/Sunburst/Type To Learn 4/Settings.ini' to point to our server. Here is what I tried so far in the postflight script #Overwriting file line by line echo "database=webservice" > '$3/Applications/Sunburst/Type to Learn 4/Settings.ini' echo "serverUrl=http://myserver:myport" >> '$3/Applications/Sunburst/Type to Learn 4/Settings.ini' echo "version_major=1" >> '$3/Applications/Sunburst/Type to Learn 4/Settings.ini' echo "version_minor=1" >> '$3/Applications/Sunburst/Type to Learn 4/Settings.ini' #overwriting the whole file cp "$0/Settings.to.copy.ini" '$3/Applications/Sunburst/Type to Learn 4/Settings.ini' Even this delete does not work! #deleting the file? rm '$3/Applications/Sunburst/Type to Learn 4/Settings.ini' What seems strange to me is that even running this on the terminal does not work either $ sudo echo "database=webservice" > /Applications/Sunburst/Settings.ini -bash: /Applications/Sunburst/Settings.ini: Permission denied PS: tried with chown to root:admin and chmod 755
Exit mobile version