git pulled files give 500 error

On a CentOS 6.3 server with WHM/cPanel:

When uploading files directly, I can access them in my browser just fine, but when I git pull them from the repository, they download but I can’t access them (500 Internal Server Error).

  • Install Omnibus Gitlab on subdomain
  • PHP build for Jenkins failing with 'Cannot run program “phploc”'
  • git trouble via https: routines:SSL23_GET_SERVER_HELLO
  • Should i use git add before or git commit before
  • git on linux, Right path, wrong version number
  • How to push Codes from Remote Server (Rackspace) to bitbucket?
  • I thought it was an ownership problem (on Ubuntu I used to set www-data as the owner), but from what I can see there is no apache user here, the files are run as the user itself. First thing when I git pull the files they have 644 permission (folder is 755, but files are 644).

    Any idea how i can make git make them 755 on git pull?

  • Git unable to update clean working directory
  • Setting up jenkins on centos: problems with ssh keys and git
  • Hudson SSH key permission denied
  • File ownership/group is changed when users push to a GIT repository
  • Git CHMOD post-receive hook
  • Laravel 5.1 CentOs7 deployement Not Found The requested URL was not found on this server
  • One Solution collect form web for “git pulled files give 500 error”

    The easiest thing to do is to commit them with the proper permissions in the first place. Git should detect you changing the mode from non-executable to executable. If you’re on an OS that lacks an execute bit – say, Windows – you can tell git to add the execute bit manually:

    git update-index --chmod=+x filename
    Git Baby is a git and github fan, let's start git clone.