SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Package Manager sets permissions incorrectly

Open Arantor opened this issue 12 years ago • 3 comments

This is actually an amalgam of multiple reports over the years.

http://www.simplemachines.org/community/index.php?topic=472532.0 http://www.simplemachines.org/community/index.php?topic=396238.0 http://www.simplemachines.org/community/index.php?topic=372905.0 http://www.simplemachines.org/community/index.php?topic=473842.0 http://www.simplemachines.org/community/index.php?topic=501169.0 http://dev.simplemachines.org/mantis/view.php?id=4939

What's happening is that package manager tries to make things writable and this ends up causing it to make files have permissions that are too high - which hosts can rightly refuse to let run (since 775 or 777 on some hosts will call foul as they shouldn't be that high)

Solution: when working on the package manager, have a PHP file that outputs a known, set value and attempt to change its permissions and then call it to see whether it still works (whilst also checking that it is writable)

Arantor avatar Jan 25 '14 04:01 Arantor

The other really weird thing was that -- on one occasion, the permission setting seemed to have extended to the parent directory of the forum directory 500 on the forum. FTP login was impossible, presumably because of lack of permission to use the ftp-login directory.

Because I am a sub-account holder of a larger account, and don't have access to the account control panel (1&1), I needed the help of the account holder to reset permission at the ftp root level so I could fix the rest of the permissions.

And I have never used pacman to set file permissions since.

AngelinaBelle avatar Jan 27 '14 19:01 AngelinaBelle

Also related: http://dev.simplemachines.org/mantis/view.php?id=4527 where the permissions are hardcoded. Whatever packman does, the values should not be hard forced to anything but to a safe value for that configuration. Perhaps even doing that test on demand (as users may forget to re-test it after a host move)

Arantor avatar Feb 09 '14 02:02 Arantor

I believe that this is actually addressed by Suki's update to the other report #3025

Kindred-999 avatar Feb 17 '16 15:02 Kindred-999