Skip to content

How to fix the Laravel file_put_contents() error in Workice CRM

I am still working to get Workice working properly and today I learned another important lesson. After figuring out that the artisan method is the only way I can install Workice properly on my server I pretty soon found out that I could not upload any files or save stuff from the admin section. It seems this is a well known rights problem that can be fixed rather easily. Still, I wonder why the artisan method, that runs on the server itself does not set the rights properly while the web installer – when it still worked the first time I used it – did set those correctly. The web is a wonderland.

Here is the fix for the files and folder rights permission problem

Simply find out the systemuser in your hosting package. Either by logging into plesk and seeing the systemuser set there or by typing ls -l somewhere in there bash/ terminal within a directory with files in your hosting package.

  • You need the suystemuser of your hosting package
  • You need the path to your Workice CRM installation

Then simply run those three commands while of course you nee to adapt the path to your install. ALso you need to change „enymserver“ in the first line with your systemuser.

chown enymserver. /var/www/vhosts/ -R
sudo find /var/www/vhosts/ -type f -exec chmod 644 {} \;    
sudo find /var/www/vhosts/ -type d -exec chmod 755 {} \;

More help on files and folder rights and permissions in laravel installations

Setting up the corrects rights and permissions is a big thing in the laravel framework. Here is more support on this topic:

Dieser Beitrag hat 0 Kommentare

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

An den Anfang scrollen