1

Is there a way to modify the permissions on generated session files? The system is writing the files to /var/session directory correctly, but without the proper access permissions (resulting in no carts or admin access):

-rw------- 1 [user] [group]   1271 2014-07-21 14:08 sess_lbqm0lbun5mlo89qvubg66keg1

I can chmod them easy enough, but would rather not have to do that every time a session is created.

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
user4984
  • 123
  • 4
  • Are you sure the dir is /var/sessions or is it relative to the Magento path? Also adding the real user/group might help. –  Jul 21 '14 at 19:27
  • This question appears to be off-topic because it is about linux, php and httpd configuration –  Jul 21 '14 at 22:24

1 Answers1

1

Try giving writing/reading permission to the entire dir, not to the single session files. By that i mean chmod the var/sessions and not the files inside it.

Another solution for the no carts or admin access is to save the sessions in the database. That can be achieved by changing the content of the <session_save><![CDATA[files]]></session_save> node for <session_save><![CDATA[db]]></session_save> in the local.xml.

mbalparda
  • 263
  • 1
  • 2
  • 8
  • I had to change the ownership permissions recently to allow someone else access, which stopped the basket functioning due to wrong ownership permissions on newly created session files - changing the provided a functioning workaround. Thanks – MistaJase Jan 26 '17 at 10:18