Skip to content

Fix Ownership and Permissions

Most of CS-Cart files should have the 644 permissions, and all directories must be set to 755. When you using CS-Cart, the var, images, and design directories, and all their subdirectories and files should have the 777 permissions. This is required to allow CS-Cart to upload files to these directories for routine operations.

CS-Cart permission fixer

For clients of our hosting, we provide the tool cscart_permfixer. Just call command via command line (SSH), select project and push “Enter”. Fixed :)

root@highloadtest public_html> cscart_permfixer
   We found cs-cart in directories:
   1. /srv/projects/highloadtest.cloud.simtechdev.us/public_html
   Please input the number of the CS-Cart project and press Enter:
   1
   Fixing all file permissions ...
   Complete.

Manual mode

Step 1: Permissions

Execute the following commands one by one:

chmod 644 config.local.php
chmod -R 755 design images var
find design -type f -print0 | xargs -0 chmod 644
find images -type f -print0 | xargs -0 chmod 644
find var -type f -print0 | xargs -0 chmod 644

These commands set the right permissions for the files, so that CS-Cart can install properly. The 3 digits represent the rights of the owner of the file/directory, the owner’s group, and other users respectively.

For example, chmod 644 config.local.php means that: - The owner of config.local.php can read the file and write to it(6). - The group to which owner belongs (e.g. administrators) can read the file (4). - All other users can also read the file (4).

Step 2: Ownership

Set the developer user as the owner of your CS-Cart files. We provide user developer, and its group is service as well. In this case, this is the command you need to use:

chown -R developer:service

Also, if you need help with it, you can contact us vie HelpDesk system.


Hint

If you have a problem, need assistance with tweaks or a free consultation, if you just want to discuss your project with experts and estimate the outcome, if you're looking for a solution that reinforces your online business, we will help. Let us know through MyCloud or email.

Back to top