12

I put up a vagrant box with teamcity. Everything works but when I add a command line build step, which contains 'drush cc all' I get this error:

Cannot run process: Cannot run program "/vagrant/public/TeamCity/buildAgent/temp/agentTmp/custom_script1106304414420673073" (in directory "/vagrant/public/dev"): java.io.IOException: error=13, Permission denied

Nealv
  • 6,856
  • 8
  • 58
  • 89
  • `Permission denied` - looks like you have a permission problem :). I'm not familiar with Vagrant, but you might want to check that whichever account the TeamCity build agent is using can access your script folder and has perms to execute it. – Philip Pittle Dec 09 '14 at 13:36
  • I can't find out how to configure the user under which teamcity operates. – Nealv Dec 09 '14 at 13:42
  • http://stackoverflow.com/questions/2485446/how-can-i-change-the-user-identity-that-runs-a-build-agent-in-teamcity – Philip Pittle Dec 09 '14 at 13:43
  • That's on windows :/ I need it on linux. – Nealv Dec 09 '14 at 13:45
  • https://devnet.jetbrains.com/thread/436841 – Philip Pittle Dec 09 '14 at 13:45
  • 2
    It's not working + no documentation to be found. think I will throw teamcity overboard for another CI. Thanks anyway – Nealv Dec 09 '14 at 15:03

1 Answers1

25

This is a permissions error that can be fixed by updating mode on github. I am guessing that your files were created with default 100644, but they need to have 100755 in order to execute on team city. Do the following in the directory with the script:

$ git update-index --add --chmod=+x your-script-file

$ git commit -m "update mode"

$ git push
cph2117
  • 2,651
  • 1
  • 28
  • 41