Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

/var/cache/templates/ File Permissions Rate Topic   - - - - -

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3654 posts

Posted 09 July 2015 - 05:49 PM #1

Does anyone know where the permissions for these files are being pulled from? They are php files and permissions are set at 0666. No, they are not being set from config.local.php. I would like them to be 0644 or even better 0600 since they are php files.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10839 posts

Posted 09 July 2015 - 11:13 PM #2

Should be using the permissions identified in config.local.php. However, you'd have to dig through the Templater and Registry caches to see just where it's being set.

But note that the 'templater' is 3rd party code and so they probably do their own thing.... Easiest thing to do would be to make a umask() call in your config.local.php. This will force anything that doesn't specify permissions to use what the mask is set to versus the hosting/php default.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3654 posts

Posted 10 July 2015 - 12:29 AM #3

Should but it isn't. It has to be defined somewhere because otherwise my server would default to 0644. Hence the reason for the thread.

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10839 posts

Posted 10 July 2015 - 12:44 AM #4

Then you'll either have to dig through the templater and registry class objects or file a bug report. If it were me, I'd do the latter.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3654 posts

Posted 10 July 2015 - 01:14 AM #5

If it were me, I'd do the latter.


I've pretty much given up on both helpdesk and bug tracker. Most likely I would get a "Working as designed" response.

 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 2040 posts

Posted 10 July 2015 - 09:45 AM #6

I've pretty much given up on both helpdesk and bug tracker. Most likely I would get a "Working as designed" response.


Yep, that used to happen:( But we will sort this out soon.

The permission for /var/cache/templates/ files are set in app/lib/vendor/smarty/smarty/libs/Smarty.class.php file.
See the public $_file_perms = 0644;
But: this variable is overwritten in app/Tygh/SmartyEngine/Core.php - so this is what you need.
    public $_dir_perms = 0777;
    public $_file_perms = 0666;

Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3654 posts

Posted 10 July 2015 - 12:08 PM #7

Thanks imac! You saved me a lot of time digging through files.

 
  • mokeshop
  • Senior Member
  • Members
  • Join Date: 27-Jul 12
  • 922 posts

Posted 10 July 2015 - 03:05 PM #8

Yep, that used to happen:( But we will sort this out soon.

The permission for /var/cache/templates/ files are set in app/lib/vendor/smarty/smarty/libs/Smarty.class.php file.
See the public $_file_perms = 0644;
But: this variable is overwritten in app/Tygh/SmartyEngine/Core.php - so this is what you need.

	public $_dir_perms = 0777;
	public $_file_perms = 0666;

i hope this will be changed by default to 644 755 because this is causing some errors in server log

[Fri Jul 10 16:47:51.552704 2015] [access_compat:error] [pid 23706] [client 54.240.145.107:16282] AH01797: client denied by server configuration: /home/demelsi/public_html/var/cache/misc/statics/design/themes/responsive/media
[Fri Jul 10 16:47:39.139612 2015] [access_compat:error] [pid 23705] [client 54.240.145.107:14832] AH01797: client denied by server configuration: /home/demelsi/public_html/var/cache/misc/statics/design/themes/responsive/media
[Fri Jul 10 16:46:55.171987 2015] [access_compat:error] [pid 23796] [client 54.240.145.107:9065] AH01797: client denied by server configuration: /home/demelsi/public_html/var/cache/misc/statics/design/themes/responsive/media
[Fri Jul 10 16:46:27.660126 2015] [access_compat:error] [pid 25243] [client 54.240.145.107:5206] AH01797: client denied by server configuration: /home/demelsi/public_html/var/cache/misc/statics/design/themes/responsive/media
[Fri Jul 10 14:55:58.277004 2015] [access_compat:error] [pid 22771] [client 54.240.144.152:23523] AH01797: client denied by server configuration: /home/demelsi/public_html/var/cache/misc/statics/design/themes/responsive/media


now we know where to set this properly

 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3654 posts

Posted 10 July 2015 - 06:18 PM #9

demeldoo, as far as I know, this issue is only related to the /var/cache/templates/ file persmissions. All of my other /var/cache/ files have the correct permissions. I do not see /var/cache/misc/statics/design/themes/responsive/media in my files. What kind of files are you seeing and what permissions do they have?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10839 posts

Posted 10 July 2015 - 06:46 PM #10

Any/all file/directory permissions should use the constants defined in config.local.php.
NO ONE SHOULD HAVE TO SEARCH to find usage. It should be defined in one place and used throughout.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • imac
  • CTO
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 2040 posts

Posted 16 July 2015 - 02:34 PM #11

Any/all file/directory permissions should use the constants defined in config.local.php.
NO ONE SHOULD HAVE TO SEARCH to find usage. It should be defined in one place and used throughout.


Right, thanks Tony. I created a task on this.
Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4363 posts

Posted 01 July 2018 - 10:48 AM #12

Im getting many of these too, can I fix it 4.5.2

 

thanks

John

 

 

Sun Jul 01 08:48:53.205413 2018] [access_compat:error] [pid 1251] [client 66.249.66.20:65511] AH01797: client denied by server configuration:

public_html/var/cache/misc/assets/design/themes/responsive, referer: https://www.hivis.co...a-arm-band.html


Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10839 posts

Posted 01 July 2018 - 07:27 PM #13

'public_html' should NOT be in that path.  My guess is that you have some type of server configuration issue that has changed.  All references to cs-cart files should be FROM public_html, not its parent directory.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.