pre-receive and post-receive hook not working

Tried creating a pre and post receive hook in bitBucket 5.2.2 instance but its not working on doing one commit to that repo.

I am just trying to create one txt file in that hook...

echo text in this file > bla.txt
echo test.

I am following this link help url

here, they said that if hook does not works then set isExecutable in application.xml file to true. but in my Bitbucket installation dir, there is no such file at BITBUCKET_HOME/logs/support 

1 answer

0 vote


Did you make the file executable (using chmod)?

Just to clarify, the application.xml file will only exist if you have generated a support zip, and it's a read-only file, so you don't need to make changes in it.



Premier Support Engineer


Please tell how to make that file executable ?

I am naming that file as '21_bitbucket_callback'. The type of this file is 'File'.

and I am putting it into :


Also my BitBucket server is installed into Windows system.


Please help.




If you are an administrator, you can modify and or check the file permissions to ensure that the user running Bitbucket has the necessary permissions such as Read & Execute.

Go to the file and right-click. Select Properties and then select the Security tab. Selecting each user should display the permissions that user has in the lower window. 

If you are unfamiliar with verifying permissions in Windows, I recommend having your network administrator or server system administrator to assist you with verification.

-Mark W.

Hi Mark,

Thanks for the reply. I tried with chmod command

(chomod -R a+x *) using Git bash to make those files executable ... and now its working.

That is great to hear! I'm glad it's working for you now.

If Christian's suggestion worked for you, feel free to select his reply as the solution by clicking the checkmark above.

Have a great day!


Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,776 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you