Jump to content

Updating modules changes permissions


Penge58

Recommended Posts

Hello

 

It seems that everytime I upgrade a module in Prestashop the permissions are changed from 644 and 755 to 755 for both files and folders.

 

I need to manually change the permissions back again after an update.

 

Why is it like that ??

 

 

Petter

Link to comment
Share on other sites

The link points to a fix were you should remove some lines in  controllers/admin/AdminModulesController.php

However I do not find these lines in the file I have here.

This must be from another version.

When I search this file I only find one line containing 777 and that is:

 

if (isset($path_parts['filename']) && @filemtime(_PS_MODULE_DIR_.$path_parts['filename']))
Tools::chmodr(_PS_MODULE_DIR_.$path_parts['filename'], 0777);
 
Should I delete this "if" statement ?
Link to comment
Share on other sites

 

The link points to a fix were you should remove some lines in  controllers/admin/AdminModulesController.php

However I do not find these lines in the file I have here.

This must be from another version.

When I search this file I only find one line containing 777 and that is:

 

if (isset($path_parts['filename']) && @filemtime(_PS_MODULE_DIR_.$path_parts['filename']))
Tools::chmodr(_PS_MODULE_DIR_.$path_parts['filename'], 0777);
 
Should I delete this "if" statement ?

 

 

Hi I can't offer that level of support in forum as I can not test 'my suggestion'.  applying is really a matter of comfort level and most importantly backing up first any files that require change.

 

note: after fix applied, it will not retroactively change permissions back, that would  need to be done manually.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...