I installed git on my VPS and I am able to clone a github repo to my web directory (I did it as the user, not as root but I tried with root before and same problem). But When I go to the url it gives me 500 internal server error but only in php files. If I upload the files manually it works fine. I have read it could be a permission issue but I can't figure out how to solve this. Cloned folders and files are showing as 775 and 664. I am running CentOS on my Vps.
1 Answers
For anyone else having the same problem. This is what I did according to this article at http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
Once I did this, the permission issue is sorted and I don't get the 500 errors anymore.
Procedure To Setup Default umask
You can setup umask in /etc/bashrc or /etc/profile file for all users. By default most Linux distro set it to 0022 (022) or 0002 (002). Open /etc/profile or ~/.bashrc file, enter:
# vi /etc/profile
OR
$ vi ~/.bashrc
Append/modify following line to setup a new umask: umask 022
Save and close the file. Changes will take effect after next login. All UNIX users can override the system umask defaults in their /etc/profile file, ~/.profile (Korn / Bourne shell) ~/.cshrc file (C shells), ~/.bash_profile (Bash shell) or ~/.login file (defines the user's environment at login).

- 308
- 4
- 15