Jump to content

[FREE MODULE] Fix unsecure filepermissions


Recommended Posts

Make directory- and filepermissions secure

This module will change directory permissions to 755 and file permissions to 644.

Step 1: Download latest version of the module from here: https://github.com/MathiasReker/filepermissions/releases/latest

Step 2: Upload the module to your PrestaShop 1.7.x store.

Step 3: Go to configuration of the module and click on 'Fix permissions' and wait until the job is done (10-30 sec).

Thats it! The permissions should now be good. If the permissions could not be changed, you will get a message about that. Now you can uninstall the module if you want.

check it out on GitHub: https://github.com/MathiasReker/filepermissions

demo.png

 

 

Edited by shinetech.dk
fix order (see edit history)
  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Hi,

Thx for your module. 

Is it possible to set exceptions to files in which it does not want to change the file permission?

Are the setting right permission in the folders: img, cache?

 

Regards,

San

Share this post


Link to post
Share on other sites

Hi Sandiegos,

The module already covers that. The module list files that could not be changed as well.

Right permissions is set for every folder within your PrestaShop, including img, cache etc.

Did you face any problem with the module?

Edited by shinetech.dk (see edit history)

Share this post


Link to post
Share on other sites

Hi,

I asked about cache and img folders, because it is recommended to set the permission in these folders to 777.

I have a problem with some files with the .sh extension. They must have permissions set to 777. After using your module I have to set permissions for these files via ftp.
Can I set your module to leave the .sh files?

Regards,

Share this post


Link to post
Share on other sites

I can adjust my module to set all rights as recommended. Please show me documentation to that cache folder and img folder should have permission 777.

What PrestaShop version do you use?

Share this post


Link to post
Share on other sites

It sounds like bad practice to have shell script on your server with permission 777.
 

Can you show me documentation to that cache folder and img folder should have permission 777?

What PrestaShop version do you use?

Share this post


Link to post
Share on other sites

I use PS 1.7.4.4. These files are used to import xml files through cron and ssh, and maybe must therefore have permissions of 777.

I had info in my backoffice config/advanced/information:

Quote

Set the write permissions for the "cache" folder
Set the write permissions for the "img" folder

 

Share this post


Link to post
Share on other sites

Hi,

The permissions of the cache and img folders are not important for me. The most important thing is, can I set in your module that e.g. .sh files have the permission 777?

Share this post


Link to post
Share on other sites

This modules does not force 755 in a hook. You can just run this module and then change sh files to 777. I don't think the module should change sh files to 777 by default, because it is very bad practice. You should rather fix your script, so it can run from 755 or use PHP with PrestaShop API.

Share this post


Link to post
Share on other sites

Hi,

I installed the module and fixed the permissions, but I still have this message "Set write permissions for the "modules" folder and subfolders." in Advanced Parameters -> Informations.

Also, some directories and files couldn't' be fixed, should I fix it manually ?

Thanks for this great module,
Cheers,

2019-03-15_0955.png

2019-03-15_0954.png

Share this post


Link to post
Share on other sites

@Takuya it looks like your hosting does not accept the php to change your permissions. At least you know where to do the changes now 🙂

For security reason: Delete phpinfo.php and move backup.tar.gz to another server. I don't know what your version.php does, but my guess is that you should remove it too.

Yes. you should fix them manually. 🙂

Edited by shinetech.dk (see edit history)

Share this post


Link to post
Share on other sites
  • 1 month later...

This module is no more supported. I made an other free module with more features instead. The new module does include all functions of this module. Please check this link:

 

  • Thanks 1

Share this post


Link to post
Share on other sites
  • Matt75 locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More