Jump to content
thirty bees forum
  • 0

default folder permissions module install


Question

Posted

In my opinion it's considered an unsafe practice to have the default permissions of folders set to 0777 upon install of new modules. I can see in file controllers\admin\AdminModulesController.php line 1222, 1225, 1252 and 1255 that the default chmod is set to 0777. Shouldn't this rather default to 0755?

7 answers to this question

Recommended Posts

  • 0
Posted

not sure why you want to use umask. Why not just set the permissions with chmod to 0755?

From the php manual comments: Whenever reasonable, default to shut and open as needed instead of default to open and shut as needed. The above still has a race condition, but the race condition will deny appropriate access instead of granting inappropriate access.

Nut you might have good reasons, not sure...

  • 0
Posted

@mdekker sorry to dig this up again, but we still have the issue of 777 folder permission with every single module install. I added your <?php if (!defined('TBUMASK')) { define('TBUMASK', 0022); } as a custom defines file, but it's not working on new module installs.

However when I change the file controllers\admin\AdminModulesController.php line 1221, 1224, 1251 and 1254 from 0777 to 0755 I no longer have this problem

can you please again as it's rather annoying having to chmod after each and every module install. Many thanks

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