Doing File / Install Permissions Manually?

Hi Guys

Sounds dumb, but I don't understand the file permissions instructions. I don't have shell access so will be doing this by hand via FTP.

This is the instruction for 4.3.9 install:

chmod 666 config.local.php

chmod -R 777 design images var
find design -type f -print0 | xargs -0 chmod 666
find images -type f -print0 | xargs -0 chmod 666
find var -type f -print0 | xargs -0 chmod 666
chmod 644 design/.htaccess images/.htaccess var/.htaccess var/themes_repository/.htaccess
chmod 644 design/index.php images/index.php var/index.php var/themes_repository/index.php
It is the bit in Red I don't understand. Can someone explain which files need to be 666?
After install previous version of CS-Cart used to say reduce from 777 to 755 or less. Is this not applicable now?
Thanks in advance.

not sure where that info came from looks garbled to me

try this and yes can all be done via ftp

http://kb.cs-cart.com/permissions

Permissions are a function of your hosting environment. Generally 777/666 is way too permissive. Some (like AWS) need 775/664 while the vast majority of cpanel environments that use either suPHP or rUID should use 755/644. The important thing is that the "ownerships" are correct, otherwise the permissions won't count for much.

Make sure the files/directories in your store are correct for how PHP is being used on your hosting plan. Simply have your hosting verify that the correct ownerships/modes are in place for a secure but useful site.

Permissions are a function of your hosting environment. Generally 777/666 is way too permissive. Some (like AWS) need 775/664 while the vast majority of cpanel environments that use either suPHP or rUID should use 755/644. The important thing is that the "ownerships" are correct, otherwise the permissions won't count for much.

Make sure the files/directories in your store are correct for how PHP is being used on your hosting plan. Simply have your hosting verify that the correct ownerships/modes are in place for a secure but useful site.

Hey, what do you mean by 775/664 for AWS?

Is it like 775 for files 664 for dirs?

By the way, should i revert them back after the upgrade or is it safe to leave them like this?

Thanks

775 is directory permissions (rwx/rwx/r-x) rwx = read/write/execute

664 is file permissions (rw-/rw-/r--)

where permissions are for (owner/group/other) and '-' is no permission.

You need to also set these in your config.local.php. But given that you don't know what those numbers mean, I'd strongly suggest you get some help from someone who does or pass that info along to your hosting and have them do it for you.

775 is directory permissions (rwx/rwx/r-x) rwx = read/write/execute

664 is file permissions (rw-/rw-/r--)

where permissions are for (owner/group/other) and '-' is no permission.

You need to also set these in your config.local.php. But given that you don't know what those numbers mean, I'd strongly suggest you get some help from someone who does or pass that info along to your hosting and have them do it for you.

lol, no i mean, i do know what permissions work i just didnt know which one was for dirs and which for files. Also i wasn't sure if you meant that AWS needs different permissions that other servers. I set them up like this and it worked thought. Thanks

AWS runs with files owned by ec2-user but PHP runs as Apache. However, they are both part of the group ec2-user.

Hence all files need to be read/write for owner and group (660) and directories need to be read/write/execute for owner/group (770).

You need to setup ftp so that it runs as ec2-user on your site or runs as a user that is in the ec2-user group.

I understand now, thank you.