简体   繁体   中英

500 Internal Server Error When Cloning Git Repo On LAMP CentOS VPS

Cloning or pulling a git repo using ssh (Laravel App) causes an internal server error when browsing to a php file. Manually adding an index.php file and echoing something works fine.

I believe it is a file permission error but this only occurs on this server. Every other server I clone to works off the bat.

Any guidance would be greatly appreciated.

I faced the same problem and doing these instructions fixed it

one must pay careful attention to the insecure permissions of user's public_html folders. The following commands will look in every user's html folder and make the appropriate CHMOD to allow php to properly execute under SUPHP. Don't forget to also check for files owned by 'nobody' or 'root' — they will also fail with a 500 error.

find /home/*/public_html/ -type d -print0 | xargs -0 chmod 0755 # For directories
find /home/*/public_html/ -type f -not -name "*.pl" -not -name "*.cgi" -not -name "*.sh" -print0 | xargs -0 chmod 0644 # For files
find /home/*/public_html/ -type f -name "*.cgi" -print0 -o -name "*.pl" -print0 -o -name "*.sh" -print0 | xargs -0 chmod 0755 # For CGI/Scripts

chmod all files and folders

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM