Time for action—setting file permissions

OpenCart system uses its several directories dynamically to create, change, and delete the files when needed. Because of this, we have to be sure that the correct file permissions are applied on these files and folders.

Now, let's see how we will set the permissions using cPanel File Manager:

  1. We should be sure that the following directories and config files are writeable, meaning that their permissions are set to at least 755. We can check this by using cPanel file manager.
    • /store/image
    • /store/image/cache
    • /store/image/data
    • /store/system/cache
    • /store/system/logs
    • /store/download
    • /store/config.php
    • /store/admin/config.php

    Note

    Some hosting systems require 777 permissions for OpenCart to work properly. If the installation screens which we will soon learn give such unwritable errors, then we should set permissions to 777 and try going through with the installation screen again.

    The following screenshot shows that all these directories are set to 755 properly, but config.php file is not set to 755:

    Time for action—setting file permissions
  2. So, let's open cPanel file manager and right-click on config.php file. Let's select Change Permissions:
    Time for action—setting file permissions
  3. Set Permission level to 755. Click the Change Permissions button.
    Time for action—setting file permissions
  4. We must repeat this process for all the folders listed below including the subfolders and files inside one by one if not set correctly to 755:
    • /store/image
    • /store/image/cache
    • /store/image/data
    • /store/system/cache
    • /store/system/logs
    • /store/download
    • /store/config.php
    • /store/admin/config.php

What just happened?

We have set the needed file and folder permissions to 755. It was needed for OpenCart to install and operate correctly. Depending on our hosting provider's linux settings, we might need 777 as well.

Note

Curious readers can learn more about server security on this http://www.unix.com/unix-dummies-questions-answers/33137-chmod-777-security-risks.html link.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.191.233