Trying to run ftpsync.pl from post-commit hook

348 Views Asked by At

As the title says, I'm trying to ftpsync changed tree to our dev web server. On committing I get this error:

post-commit hook failed (exit code 13) with output: Cannot create syncfile for time sync option at /data/ftpsync/ftpsync.pl line 484.

I've tried looking at line 484 but Perl looks like a foreign language to me :)

What permissions do I need to set and where so that syncfile can be created?

1

There are 1 best solutions below

2
On BEST ANSWER

It creates the file in the current directory, and as far as I can tell doesn't change directories before that point. The easiest thing to do would be to change directories to /tmp before starting the script (and specify a local directory in its args instead of using the default .).