DEV Community

Oluyemi
Oluyemi

Posted on • Originally published at Medium on

Bad Permissions writeable by group — Laravel

Internal Server Error

If you have ever come across this error while deploying applications especially Laravel applications to shared hosting, then you just got for yourself the right post.

So you just deployed your application to the server and instead of the contents being rendered, you were greeted with internal server error .

A (500) Internal Server Error can be caused by many instances, including but not limited to invalid permissions, invalid ownership, errors in php.ini or .htaccess file, invalid requests in the script and others.

Generally, this is not a problem with the server itself and can often be rectified by modifying something in your site’s configuration. The best approach is to check the Error logs in cPanel for the particular information.

So if the error log says Directory is writeable by group:

This is an indication that the folder had permissions for a folder set too high. To correct this, the permissions need to be changed from 777 to 755.

Directories and folders should be 755. Executable scripts within the cgi-bin folder must be 755. Images, media, and text files like HTML should be 644.

  • Files — 644
  • CGI Scripts — 755
  • Directories — 755

You can modify permissions with the File Manager, located in the “Files” category of the cPanel, an FTP client, or using the chmod command in SSH/Bash.

Final Note

This error is not in anyway specific to Laravel Applications, I only used that as my title because I encounter this while uploading an application built with Laravel.

I hope you found this post useful and if you have a different or other approach to resolving an issue like this, kindly share your thoughts and comments below.

Top comments (0)