Prestashop: Incorrect permission 0777 and 0666

Created on 10 Jan 2019  路  8Comments  路  Source: PrestaShop/PrestaShop

You seem to have enabled by default the creation of insecure folder and file permissions.
Is this an error throughout your symfony setup (example below from bin/console).

// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
umask(0000);

If not why are you doing this you should leave that for the server to configure?

Install a theme and then check folder and file permission using current PS1.7.5
Result 0777 and 0666.
Should be 0755 and 0644.

Previous closed issue https://github.com/PrestaShop/PrestaShop/issues/11634

1.7.5.0 CO Fixed

Most helpful comment

Hello everyone,
I create a pull request to remove everything around the umask force.
https://github.com/PrestaShop/PrestaShop/pull/12124
I am totally agree with you, we must not force the folder permission mode!

All 8 comments

Hi @markaussie,

Thanks for your report.
I edited the permission of the PrestaShop folder to 755.
I tried to install a new theme, in the PrestaShop/themes/new_theme the new_theme folder has 777 as permission.
@eternoendless @PrestaShop/prestashop-core-developers what do you think?
Thanks!

I totally agree. This is not OK. Plus, on Litespeed Server, setting 0666 and 0777 will give 403 Forbidden errors. Each time I install a new module I must FTP to the module folder to change all file and folder permissions or else I get random 403's when dealing with that module.

This issue is related to a previous ticket: http://forge.prestashop.com/browse/BOOM-2948

Hello everyone,
I create a pull request to remove everything around the umask force.
https://github.com/PrestaShop/PrestaShop/pull/12124
I am totally agree with you, we must not force the folder permission mode!

@markaussie Thanks for re-opening this issue. Looked like my report #11634 was being ignored.

@julianmatz I don't understand why your report has been closed to quickly. I'm in favor to make sure every systems are using the best practices about security.

@PierreRambaud May have been misunderstood or perhaps it was my wording, but I'm happy to see the issue got picked up :) And nice work!

Maybe someone who come across this issue, will look for a way to change permissions. Therefor I will share a simple module to do that: https://github.com/MathiasReker/filepermissions :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zuk3975 picture zuk3975  路  3Comments

matks picture matks  路  3Comments

rGaillard picture rGaillard  路  3Comments

PrestaShark picture PrestaShark  路  3Comments

matks picture matks  路  3Comments