2

Please refer the below post.

IBM Worklight - "Permission denied" when building in Xcode

I am using the Worklight 6.1. I build the environment with Ant Task. Ant task creates my Native folder for android and iPhone environment. I try to build the iPhone native which has been generated by Ant Task is giving the below error. Tried giving read & right permission manually. no fix.

Running a custom build phase script: buildtime.sh
/Users/prasanna/Library/Developer/Xcode/DerivedData/MobileAppIphone-coksdtlrretmihenzyztxxxdcuss/Build/Intermediates/MobileAppIphone.build/Debug-iphonesimulator/MobileAppIphone.build/Script-427B829D1393724500F223DC.sh: line 7: /Volumes/DataHD/ST/Mobile_Client/temp/PROD/iPhone/buildtime.sh: Permission denied
DONE with script: buildtime.sh (exitStatus=126)\n\n
Community
  • 1
  • 1
Ragu
  • 402
  • 1
  • 4
  • 18

3 Answers3

3

Verify the following:

  1. Create the project in Eclipse
  2. Build it using Worklight Studio
  3. Right-click on the generated iphone\native\buildtime.sh file

Check if it has the required permissions

Do the same with Ant
Check if it has the required permissions

If the result differs then this is a defect in Worklight 6.1.0.x


That said, following one of the options from the answer you've linked to should work, however you do not mention which option did you follow...

Given you are using a command line, I'd opt to following the second option to use CHMOD.

It could be that you have given it the wrong path.
Experiment with the path and come back with results.

you can also change the permission using [CHMOD][3]:

  1. Copy the path to the folder holding the buildtime.sh file
  2. Open the Terminal app
  3. Run the following command (but use your own path from 1 above): chmod 755 /Users/idan/Documents/Worklight/workspace-6001/TestProject/apps/TestApp/iphone/native/buildtime.sh
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Thanks Adar, Added the CHMOD 755 in my Ant Script for all files and folder. Issue solved. Setting Read / Write / Execute Permissions to all files and .sh files – Ragu Apr 04 '14 at 13:07
  • @PVR, if my answer helped resolve your problem, please mark as answered. – Idan Adar Sep 06 '14 at 16:05
3

buildtime.sh is executable file, you need to give it executable permissions, not just r&w

Anton
  • 3,166
  • 1
  • 13
  • 12
0

Adding the CHMOD 755 in my Ant Script for all files and folder will solve this permission issue.

<target name="set-permission"> <echo level="info">Setting Read / Write / Execute Permissions to all files and .sh files</echo> <chmod perm="755" includes="/*.sh"> <fileset dir="${basedir}/temp/QA/iphone"> <exclude name="**/trial/"/> </fileset> </chmod> </target> 
Ragu
  • 402
  • 1
  • 4
  • 18