2

I'm trying to run a phonegap hook which I found on the net but I always get the same error on build

execvp() Permission denied

the hook is the "splash and icon" hook located here:

http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/#comment-332073

any help is much appreciated

Luke Snowden
  • 4,056
  • 2
  • 37
  • 70
  • on a side note, just found it has nothing to do with the script. It is to do with the folder "before_build" i think – Luke Snowden Aug 21 '14 at 18:52

3 Answers3

4

Found the answer

chmod -R 777 before_build

Luke Snowden
  • 4,056
  • 2
  • 37
  • 70
1

Even i got the same error when i tried to add a platform to the ionic application. Its not just the problem with phone gap. It is also a headache while adding platforms in an ionic application. I was searching for the solution and finally, i landed at this page. Based on Luke Snowden answer i tried to find the solution. But in ionic app, there won't be any folder with the name before_build. And the solution is just changing the mode of files present in the hooks folder. The permissions should have +x i.e. execute permissions.

Go to hooks folder, you may find the following two folders

1) after_prepare
2) before_platform_add

Change the permissions of two folders to +x

chmod -x <folder name>

You can even change individual file's permission also. Go to the respected folder and say

chmod -x <file name>

for each file to change the mode to +x.

After you are done with the above process, now we can add platforms to the application.

ionic platform add android

Now it wont show any errors on the console.

Hope this might help people who are facing the similar kind of problem.

Rajeshwar
  • 2,290
  • 4
  • 31
  • 41
1

Go to the root folder and go one folder upwards. Then give execute permission only rather than giving 777. This worked for me.

chmod -R +x folder_name

cordova build Command failed with exit code EACCES

Community
  • 1
  • 1
Techie
  • 44,706
  • 42
  • 157
  • 243