Set Permissions

Set File and Directory Permissions:

To set permissions to all zCart directories to 755 and your files to 644, open your server terminal and run below commands:


sudo find /path/to/your/application -type f -exec chmod 644 {} ; 

And Directories:

sudo find /path/to/your/application -type d -exec chmod 755 {} ; 

Warning: Replace the /path/to/your/application with your project path.



Give Permissions To Webserver:

You must have to give the webserver the rights to read and write to storage and cache directories. To do so, open your server terminal, cd /path/to/your/application and run below commands:
sudo mkdir storage/app/public/images;
sudo chgrp -R www-data .env public storage vendor bootstrap/cache;
sudo chmod -R 775 storage vendor bootstrap/cache storage/app/public/images;
sudo chmod -R ug+s+rwx .env public storage vendor bootstrap/cache;


Warning: Assumed your webserver is running as www-data


Was this helpful to you?

Leave Comment