Problem: Every git aws.push changes permissions on phpMyAdmin/config.inc.php to 666 and needs to be 555
Overview: I have an Amazon AWS elastic beanstalk site with PHP / MySQL. In the site files, I have phpMyAdmin in the folder /phpmyadmin. My desktop computer is running windows 7. I've done the following:
- edited config.inc.php to include the necessary fields to connect to my MySQL dB
- performed git add to put under version control
- performed git commit to commit the file
- performed git aws.push to move the file to the server
- executed ssh to server to perform chmod 755 to the file
- launched phpMyAdmin from the browser and successfully connected
Any subsequent git aws.push causes the permissions on config.inc.php to be reset to 666 so I can no longer connect with phpMyAdmin until I run the SSH and execute the chmod
Failed Solution
- created .gitignore file in /phpmyadmin folder
- added config.inc.php to the .gitignore file
- executed git rm --cached config.inc.php to take the file out from source control
I then proceeded to execute an edit / git add / git commit / git aws.push on another file
The result was that /phpmyadmin/config.inc.php was removed from the server rather than just being ignored for the push
Desired Solution /phpmyadmin/config.inc.php on the AWS server with the permissions remaining at 755 when other files are updated and pushed to the server