Jump to content

Prestashop 1.7 sets permissions to 666


Recommended Posts

Everytime I install Prestashop 1.7, or a theme, or a module, dir permissions are being set to 777 and files to 666. This prevents install, or adding modules or themes without manually resetting permissions to 755 and 644, respectively.

 

I contacted my host as no one on the forums seems to be experiencing the same problems. This seems unlikely but here is their reply:

 

 

"The zip file provided by prestashop has the file permissions set to 666. They are being retained when unzipping. I downloaded the file from command line to test.
 
[email protected] [~/Test]# unzip -Z prestashop_1.7.1.1.zip
Archive: prestashop_1.7.1.1.zip
Zip file size: 58264598 bytes, number of entries: 3
-rw-rw-rw- 3.0 unx 641728 tx defX 17-Jan-24 08:50 index.php
-rw-rw-rw- 3.0 unx 308 tx defX 17-Apr-04 09:25 Install_PrestaShop.html
-rw-r--r-- 3.0 unx 63178330 bx defX 17-Apr-19 02:13 prestashop.zip
3 files, 63820366 bytes uncompressed, 58264100 bytes compressed: 8.7%
[email protected] [~/Test]#  
 
-rw-rw-rw-
^This is incorrect permissions for this webserver and are ultimately how prestashop is providing their file to you. It is possible they have anticipated an alternative hosting environment when creating the file, but that is not clear."
 

 

Googling for best permissions suggests 755 for dirs, and 644 for files and this is what my server excepts, not 777 and 666, respectively.
 
So, are they correct, and everyone is changing permissions manually?
Link to comment
Share on other sites

  • 1 month later...
  • 7 months later...
  • 2 weeks later...
  • 1 month later...
  • 1 month later...

I had this issue with Prestashop 1.7 and I tracked it back to a setting in app/console

Below are the first few lines in the file. In my case the following was uncommented, "umask(0000); // This will let the permissions be 0777"

 

// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000); // This will let the permissions be 0777

 

I hope this helps someone else.

Regards

Steve

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...