Bitbucket Server Upgrade Fails with 'Permission Denied' Error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Bitbucket Server upgrade fails with following error reported in the logs:
1
2
3
4
5
2012-12-06 01:19:11,743 ERROR [main] c.a.s.i.s.g.v.PerlBinaryValidation Error validating Perl
com.atlassian.bitbucket.exception.ServerException: An error occurred while
executing an external process: '/usr/local/git/bin/git commit -m
Initial' exited with code 1 saying: fatal: cannot exec
'.git/hooks/pre-commit': Permission denied
Perl is already installed on the server.
Cause
There is a permission mismatch between the user which is running Bitbucket Server and the user which owns the Bitbucket home directory.
Resolution
Ensure that the user which is running Bitbucket Server owns the home directory (and its contents).
If you are still running into this problem, set the following flag in your bitbucket.properties in your Bitbucket home directory. The file will need to be created, if it does not exist already:
plugin.bitbucket-scm-git.perl.validation.enabled=false
Was this helpful?